Cloud Firestore transaction error

I'm implementing random chat program with cloud firestore, but transaction function is not working.
Future<void> setRandomUser() async {
    CollectionReference col = sl.get<FirebaseAPI>().firestore.collection(firestoreRandomChatCollection);
    DocumentReference doc = col.document(sl.get<CurrentUser>().uid);
    Random random = Random();
    int randomValue = random.nextInt(pow(2,32));

    await sl.get<FirebaseAPI>().firestore.runTransaction((transaction) async{
      await transaction.update(doc, {
        firestoreRandom: randomValue,
        uidCol: sl.get<CurrentUser>().uid
      });
    });
  }

Error message
E/AndroidRuntime(12573): java.lang.RuntimeException: An error occurred while executing doInBackground()
E/AndroidRuntime(12573): 	at android.os.AsyncTask$3.done(AsyncTask.java:353)
E/AndroidRuntime(12573): 	at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
E/AndroidRuntime(12573): 	at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
E/AndroidRuntime(12573): 	at java.util.concurrent.FutureTask.run(FutureTask.java:271)
E/AndroidRuntime(12573): 	at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245)
E/AndroidRuntime(12573): 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
E/AndroidRuntime(12573): 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
E/AndroidRuntime(12573): 	at java.lang.Thread.run(Thread.java:764)
E/AndroidRuntime(12573): Caused by: java.lang.IllegalArgumentException: Provided document reference is from a different Firestore instance.
E/AndroidRuntime(12573): 	at com.google.firebase.firestore.FirebaseFirestore.zza(com.google.firebase:firebase-firestore@@17.1.1:384)
E/AndroidRuntime(12573): 	at com.google.firebase.firestore.Transaction.zza(com.google.firebase:firebase-firestore@@17.1.1:203)
E/AndroidRuntime(12573): 	at com.google.firebase.firestore.Transaction.update(com.google.firebase:firebase-firestore@@17.1.1:145)
E/AndroidRuntime(12573): 	at io.flutter.plugins.firebase.cloudfirestore.CloudFirestorePlugin$5.doInBackground(CloudFirestorePlugin.java:360)
E/AndroidRuntime(12573): 	at io.flutter.plugins.firebase.cloudfirestore.CloudFirestorePlugin$5.doInBackground(CloudFirestorePlugin.java:354)
E/AndroidRuntime(12573): 	at android.os.AsyncTask$2.call(AsyncTask.java:333)
E/AndroidRuntime(12573): 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
E/AndroidRuntime(12573): 	... 4 more

Flutter doctor
[√] Flutter (Channel beta, v1.1.8, on Microsoft Windows [Version 10.0.17134.523], locale ko-KR)
    • Flutter version 1.1.8 at C:\flutter
    • Framework revision 985ccb6d14 (5 weeks ago), 2019-01-08 13:45:55 -0800
    • Engine revision 7112b72cc2
    • Dart version 2.1.1 (build 2.1.1-dev.0.1 ec86471ccc)

[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at C:\AndroidSDK
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • ANDROID_HOME = C:\AndroidSDK
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses

[√] Android Studio (version 3.2)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 31.3.1
    • Dart plugin version 181.5656
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)

[!] IntelliJ IDEA Community Edition (version 2018.2)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2018.2
    X Flutter plugin not installed; this adds Flutter specific functionality.
    X Dart plugin not installed; this adds Dart specific functionality.
    • For information about installing plugins, see
      https://flutter.io/intellij-setup/#installing-the-plugins

[√] VS Code, 64-bit edition (version 1.30.2)
    • VS Code at C:\Program Files\Microsoft VS Code
    • Flutter extension version 2.22.3

[√] Connected device (1 available)
    • SM G955N • ce0617162b7a010d01 • android-arm64 • Android 8.0.0 (API 26)

Looks like this is because of sl.get<FirebaseAPI>()

Looks like this is because sl.get<FirebaseAPI>() returns a different instance every time, but it's unclear because the source is not included.
Please consider asking support questions in one of the other channels listed at http://flutter.io/support .

@zeochi
I used getIt package, so it always returns same instance.
GetIt sl = GetIt();

void setup() {
  .....
  sl.registerLazySingleton<FirebaseAPI>(() => FirebaseAPI());
  ....
}

I think it is the problem of cloud firestore transaction, how do you think?

Doesn't look like that to me, even though firebase transactions are known to have some issues.
The code you posted doesn't provide more insight because all it does is forward to other code that you did not post.

I reproduced simple example without any customized codes but It occurs same error.
Future<void> setRandomUser() async {
    CollectionReference col = sl.get<FirebaseAPI>().firestore.collection('test');
    DocumentReference doc = col.document('test');

    await sl.get<FirebaseAPI>().firestore.runTransaction((transaction) async{
      DocumentSnapshot snapshot = await transaction.get(doc);
      if(snapshot.exists){
        await transaction.update(snapshot.reference, {
          'test': 'test'
        });
      }
    });
  }

I searched google and found SO question. I think this problem is unsolved, right?

I think the error comes from sl.get<FirebaseAPI>() which is completely opaque because you didn't post any related code.

Its just simple code...
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:firebase_auth/firebase_auth.dart';
import 'package:privacy_of_animal/resources/strings.dart';
class FirebaseAPI {
  FirebaseAuth auth = FirebaseAuth.instance;
  Firestore firestore = Firestore.instance;

  Future<String> get user async {
    String result = await auth.currentUser().then((user) => user.uid).catchError((error)=>error);
    return result;
  }

  Future<void> deleteUserAccount(String uid) async {
    CollectionReference col = firestore.collection(firestoreDeletedUserListCollection);
    DocumentReference doc = col.document(uid);
    await firestore.runTransaction((tx) async{
      await doc.delete();
    });
  }
}

Its just simple code...

only when it's available to look at it ;-)

Its just simple code...

only when it's available to look at it ;-)

Sorry, need more code on this?

I haven't used Firestore myself yet but I think the issue is that
    await firestore.runTransaction((tx) async{
      await doc.delete();
    });

should be something like
    await firestore.runTransaction((tx) async{
      await tx.delete(); // use `tx` here instead of `doc`
    });

I assume that your real code looks different, because there is no point in wrapping such a single atomic action with a transaction (mentioned just to be sure).

Firstly, I used ur suggestion, but it didn't work so I used my solution. Then, I think it is related to #17663 Isn't it?

but it didn't work

What does that mean exactly?
See also https://github.com/flutter/flutter/issues/14655#issuecomment-440540922
There is also https://stackoverflow.com/questions/50280256/flutter-cloud-firestore-plugin-transactions-on-android
Perhaps trying like explained in https://pub.dartlang.org/packages/cloud_firestore is worth a try where you in the transaction read the item again and then use delete (instead of update used in the example)

When I run transaction, it abruptly terminate app.

It was related to configuration of firebase, solved

@baeharam how did you solve it ?

@baeharam how did you solve it ?

Check ur firebase configuration

Check what exactly?!

Like this
  Future<void> appInitialize() async {
    await FirebaseApp.configure(
      name: 'PrivacyofAnimal',
      options: const FirebaseOptions(
        googleAppID: androidAppID,
        apiKey: appAPIKey,
        projectID: projectID
      )
    );
    await Firestore.instance.settings(timestampsInSnapshotsEnabled: true);
  }

@baeharam how did you resolved your issue cos am also facing the same problem with firestore

I had the same problem. Try this. Hope it Helps
FIrestore Transaction Handler

@baeharam
This issue has been moved to https://github.com/FirebaseExtended/flutterfire/issues/449. Any further collaboration will be done there.


install: create destination file with safer modes before copy

Fix #6435.
As is suggested by the original issue, the creation of the destination file is delegated to fs::copy which creates the file with default mode 0644. This makes the file readable by other users before the final chmod is done, which is potentially unsafe and inconsistent with GNU install.
Since the current implementation unconditionally removes the destination path before the copy, creating the file with a minimal u=rw permission would not hurt the copy. This patch implements this (for unix).

Could you please add a test to make sure we don't regress? Thanks

There was indeed a regression: when the fs::copy call failed, the created destination file was not removed. I just pushed a new patch that fixes this.
I added a test to make sure that no file will be created when fs::copy fails (e.g., the source file cannot be read), and if it succeed, the destination file's mode is set correctly. This makes sure that it works as before no matter the copy succeeds or not.
I'm not sure how to use a test case to check whether the new file is created in mode 0600, since the creation is in the middle of an internal function, but the strace output confirms so If you have any suggestions please let me know. Thanks!

thanks and sorry for the latency

This did not fix the problem -- the magic fchmod to 644 is still there making the file temporarily accessible.
Moreover this introduces a regression where the target file gets unlinked even if the source does not exist. I verified install from gnu coreutils just exits in such a case without messing with the target.
below strace from a setup as in the bug report,  installing from /tmp/srcdir/foo to /tmp/dstdir/foo. there is tons of noise there which I elided for clarity.
unlink("/tmp/dstdir/foo")               = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/tmp/dstdir/foo", O_WRONLY|O_CREAT|O_EXCL|O_CLOEXEC, 0600) = 3
close(3)                                = 0

This executes regardless if /tmp/srcdir/foo exists or can be copied, meaning by this point the content of the target is whacked. The new file does however have 600 perms. The file should remain unaltered if src can't be copied.
openat(AT_FDCWD, "/tmp/srcdir/foo", O_RDONLY|O_CLOEXEC) = 3
statx(3, "", AT_STATX_SYNC_AS_STAT|AT_EMPTY_PATH, STATX_ALL, {stx_mask=STATX_ALL|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0644, stx_size=0, ...}) = 0
openat(AT_FDCWD, "/tmp/dstdir/foo", O_WRONLY|O_CREAT|O_TRUNC|O_CLOEXEC, 0100644) = 4
statx(4, "", AT_STATX_SYNC_AS_STAT|AT_EMPTY_PATH, STATX_ALL, {stx_mask=STATX_ALL|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0600, stx_size=0, ...}) = 0
fchmod(4, 0100644)                      = 0

Note the target is accessible through fd 4. Rust code just chmoded it to 644, making it again readable by everyone who can access the directory and defeating the original open.
copy_file_range(3, NULL, 4, NULL,<PHONE_NUMBER>, 0) = 0
[..]
chmod("/tmp/dstdir/foo", 0700)          = 0

Only now the file goes back to the expected state.
All in all the fs::copy API is probably fine for some cases, but is a total non-starter for serious programs. I failed to find a variant which accepts file handles instead, Rust needs to grow one.

ok, thanks for the very quick reaction. I will revert it then.

Ye makes sense.
I'm going to prod the rust people about better fs::copy so that this can be properly fixed.

@mjguzik Thanks a lot for the feedback.

I found that rust has a variant accepting file handles: https://doc.rust-lang.org/beta/std/io/fn.copy.html
this will do it


Razor Pages individual auth template page LoginModel missing    [AllowAnonymous]

To Repo:

Create a RP (Razor Pages) app with individual user accounts.
Add  RequireAuthenticatedUser to StartUp.
Add [AllowAnonymous] to Pages/Index.cshtml.cs

Run the app. Tap Register/Login/About and it trys to redirect you to the Login page, but the LoginModel doesn't allow anon, so it redirects recursively and results in the following error:
HTTP Error 404.15 - Not Found
The request filtering module is configured to deny a request where the query string is too long.
Most likely causes:
•         Request filtering is configured on the Web server to deny the request because the query string is too long.
Repo app here.
Fix is to add [AllowAnonymous] to the Login/Register PageModel.
[AllowAnonymous]
 public class LoginModel : PageModel

We should change the code to do this so that everything works better once people make changes:
[AllowAnonymous]
 public class LoginModel : PageModel

We also need to change it in the Identity.UI package in the Identity repo (cc @javiercn FYI).

Allow anonymous doesn't work on Pages. I don't exactly know what's going on here, but auth is not configured like that (at least in 2.1). The login page was never under an authorize filter.

Yeah, we should do this

Will it be too presumptuous to add [AllowAnonymous] to Index.cshtml in the templates by default? The landing page is usually safe to be allowed to viewed anonymously and it can be easily deleted to go back to requiring auth. @javiercn

This is related to the login, register and logout pages I would presume (check if there is anything else that needs to be available without authorization). because you need to be able to access them in all cases.
If you are doing [Authorize] globally that's likely what you want.
If we add [AllowAnonymous] to random pages that defeats the purpose of having [authorize] applied globally.
Does it make sense?

I don't think Logout should be included. You should be logged in to log out, right? Am I missing an edge case? I'll add it to Login and Register and check for others.

When you logout you are unauthorized and you shouldn't be sent back to the login page.
Please try out all possibilities and come up with a list (Social login, 2FA, etc.)

Login and Register. Don't put it on Index, folks know to do that.

This issue was moved to aspnet/Identity#1617

Reopening because scenario does not work correctly after scaffolding the file-based Identity into a project. See aspnet/Release#263 for some notes on that scaffolding.
Workaround is to manually add [AllowAnonymous] to page models (now on disk!) as users hit issues.

@jbagga should this issue now move to aspnet/scaffolding? I'm not sure any affected files remain in this repo. For example, I found what appears to be a ForgotPassword.cshtml.cs template in aspnet/scaffolding.

Filed https://github.com/aspnet/Scaffolding/issues/735


Rename the tags() functions of Repository and of WorkingCheckout to getTags()

Rename the tags() functions of Repository and of WorkingCheckout to getTags().  Until recently this was a property called tags, but now that it’s a function it makes more sense to call it getTags().
Motivation:
This makes it more consistent with all the other functions, which have a verb at the start, but more importantly makes it easier for clients to adopt to the change (having a property change to a method without changing name makes it difficult for a type that adopts the protocol to conform to both).
Modifications:
Renamed the function in protocols and clients.
Result:
No change in functionality but more consistent naming and easier transition for clients.

@swift-ci please smoke test


Issue 214

This reverts the previous fix to #152, and replaces it with a new implementation that is compatible with PHP 7.4 and therefore fixes #214.  Or at least, I think this fixes #152.  This has not been extensively tested.  All I did was change the regex ([^@]+)@(.+) to (.+)@([^@]+), so that the last at-sign will be the separator instead of the first.  So perhaps treat it as a suggestion.

I've made a quick fix, to release a new version ASAP! But I will also have a look at your proposal! Maybe we have to add some tests.

Oh nice, thank you for the quick work!  Confirmed that your change fixes the problem for me.  I didn't expect such a quick response, otherwise I wouldn't have dived in 🤣
I'm pretty helpless with running PHP unit tests locally, I don't submit changes like that often enough for it to be second nature, and I don't have much spare time.  So I think I'll close this PR for now as being unnecessary.


Use build environment for CI, and drop --token for coverage

Testing build environments to pass codecov token

Codecov Report

:exclamation: No coverage uploaded for pull request base (main@0597338). Click here to learn what that means.
The diff coverage is n/a.

@@           Coverage Diff            @@
##             main        #1   +/-   ##
========================================
  Coverage        ?   100.00%
========================================
  Files           ?         4
  Lines           ?       229
  Branches        ?        52
========================================
  Hits            ?       229
  Misses          ?         0
  Partials        ?         0

Continue to review full report at Codecov.

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

Codecov Report

:exclamation: No coverage uploaded for pull request base (main@0597338). Click here to learn what that means.
The diff coverage is n/a.

@@           Coverage Diff            @@
##             main        #1   +/-   ##
========================================
  Coverage        ?   100.00%
========================================
  Files           ?         4
  Lines           ?       229
  Branches        ?        52
========================================
  Hits            ?       229
  Misses          ?         0
  Partials        ?         0

Continue to review full report at Codecov.

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


How to select marker on map?

Before I use this solution, I do it with that code:
var marker: GMSMarker!
for rink in rinks {
    marker = GMSMarker()
    ...
}
if rinks.count == 1 {
    self.map.selectedMarker = marker // this string
}

Now it doesn't work. Please, promt me how to do it coupled with clusterManager.

Decided by non-clustering if have only one marker.


Incorrect prioritization of filename suggestions in quick open dialog (Ctrl+P)

Does this issue occur when all extensions are disabled?: Yes

VS Code Version: 1.74.2
OS Version: Ubuntu 20.04

Steps to Reproduce:

Clone the mdn/content repository
Open the quick open dialog by pressing Ctrl+P
type "ftu index" or "glossary ftu index"
Observe that the files/en-us/glossary/ftu/index.md is not the first result. Instead, other results that split the "ftu" into separate letters (like e.g. files/en-us/glossary/turn/index.md) get higher priority.

Does this repro a similar behavior when your second word has more than 3 characters? So like stun index? I think the problem here is that matching the first character in the path is weighted higher than an exact word match inside of the path.
cc @bpasero if you have thoughts.

You can print diagnostics by commenting out all the code that uses DEBUG and/or DEBUG_MATRIX:
https://github.com/microsoft/vscode/blob/688900a2d618c1a731b42384d71c5b107113373e/src/vs/base/common/fuzzyScorer.ts#L22-L23
I noticed it was not very clear so I have https://github.com/microsoft/vscode/pull/171308 opened to improve the output.
Running so produces (for ftu):

Here in this case, since the query is short, the bonus for consecutive matches is not winning over the "Start of word bonus", so we boost the initial f over the later one.
All in all this is a matter of tweaking how to boost consecutive matches. Today we only boost when the query is significant enough. We could try to tweak that but we also have tests to see if then other examples fall apart.


Document RocksDB Compilation process/make better

to compile astria-sequencer you will need a gcc version older then 13 because it transitively depends on rust-rocksdb:0.19 (via penumbra-storage). On archlinux:
sudo pacman -S gcc12 gcc12-libs
CC=/usr/bin/gcc-12 CXX=/usr/bin/c++-12 cargo check

On macOS you need brew install gcc12. I have configured an .envrc with https://github.com/direnv/direnv to automatically set CC and CXX when cd'ing into astriaorg/astria

This has not reared its head in a while, assuming updates to rocksdb via dependencies may have fixed?


download pretrained models in a local disk storage?

Additional context
Hello ESM support team:
Our HPC cluster does not have internet access due to firewall restriction.
For example, the following code :
model, alphabet = torch.hub.load("facebookresearch/esm:main", "esm2_t33_650M_UR50D")
reaches https://dl.fbaipublicfiles.com/fair-esm/models/esm2_t33_650M_UR50D.pt to download data model.
I wonder if there is a way to download all the pretrained models before running the application?
Thank you!

Please see here

@gieses : Thank you for a reply.
I do see all the pretrained models.  I can use
either
import torch
model, alphabet = torch.hub.load("facebookresearch/esm:main", "esm2_t33_650M_UR50D")
or
model, alphabet = esm.pretrained.esm2_t33_650M_UR50D()
for every model. Or, might be other method? May you advise?
Next, if the models are downloaded and placed in a local disk, how to (which function) modify the script to use the model directly?
I appreciate your help.

The table I linked contains the links to the weights that you can download and move around as you wish. You can adjust the path where the loading routine checks for the models, e.g. discussed here: https://github.com/pytorch/pytorch/issues/69761 (otherwise it defaults to ~/.cache/torch/hub/checkpoints).

@gieses Thank you very much for the tips.
I am not an expert on python programming, by looking at the pytorch/pytorch#69761, if I have the followings in python script
import torch
torch.hub.set_dir("/rsrch3/scratch/reflib/REFLIB_data/esm-v1.0.3")
/rsrch3/scratch/reflib/REFLIB_data/esm-v1.0.3 has downloaded pretrained models, with .pt extension
Next, how do create a command that can be equivalent to torch.hub.load, but looking for the above torch.hub directory?
model, alphabet = torch.hub.load("facebookresearch/esm:main", "esm2_t33_650M_UR50D")
Thank you!

Yes torch.hub.set_dir() works.

@YaoYinYing: do you know the answer for my questions?

@YaoYinYing: do you know the answer for my questions?

I have attached one script in my fork and this is the PR also.
Would you please check scripts/download_weights.sh in my fork?

@YaoYinYing : "I have attached one script in my fork and this is the PR also." May I know what does it mean? How to find your fork?

@ryao-mdanderson Thanks for testing this script!
Looks like you have set /rsrch3/scratch/reflib/REFLIB_data/esm-v1.0.3/hub as model directory. Now you may use torch.hub.set_dir('/rsrch3/scratch/reflib/REFLIB_data/esm-v1.0.3/hub') to set this directory in your Python script just before model loading. Pytorch will search for a sub directory called checkpoints  by itself and look for downloaded pretrain model files.
To load pretrained models, you can simply use model = esm.pretrained.esmfold_v1() or model, alphabet = esm.pretrained.esm2_t33_650M_UR50D().

@YaoYinYing I have some problems loading the model esmfold_v0
I have downloaded the .pt file and added it to the checkpoints folder, followed by:
torch.hub.set_dir(root)
model = esm.pretrained.esmfold_v0()

 esmfold_v0 is correctly loaded as it accounts for the local hub. in esm/blob/main/esm/esmfold/v1/pretrained.py we have:
def _load_model(model_name):
    if model_name.endswith(".pt"):  # local, treat as filepath
        model_path = Path(model_name)
        model_data = torch.load(str(model_path), map_location="cpu")
    else:  # load from hub
        url = f"https://dl.fbaipublicfiles.com/fair-esm/models/{model_name}.pt"
        model_data = torch.hub.load_state_dict_from_url(url, progress=False, map_location="cpu")

It then proceeds to load the LM part in model = ESMFold(esmfold_config=cfg) which fails.
This is because the following code does not account for the local hub.
def load_hub_workaround(url):
    try:
        data = torch.hub.load_state_dict_from_url(url, progress=False, map_location="cpu")
    except RuntimeError:
        # Pytorch version issue - see https://github.com/pytorch/pytorch/issues/43106
        fn = Path(url).name
        data = torch.load(
            f"{torch.hub.get_dir()}/checkpoints/{fn}",
            map_location="cpu",
        )
    except urllib.error.HTTPError as e:
        raise Exception(f"Could not load {url}, check if you specified a correct model name?")
    return data

I have added the esm2_t36_3B_UR50D.pt model to the checkpoints folder, however the code still tries to download the model again.
I would expect the creation of the ESMFold model to only use the esmfold_v0.pt file path, but even with the separate download of esm2_t36_3B_UR50D.pt  it still fails.


Is there a way for the App to fire app_home_opened after a button?

Description
Describe your issue here.
What type of issue is this? (place an x in one of the [ ])

[ ] bug
[ ] enhancement (feature request)
[x] question
[ ] documentation related
[ ] testing related
[ ] discussion

Requirements (place an x in each of the [ ])

[x] I've read and understood the Contributing guidelines and have done my best effort to follow them.
[x] I've read and agree to the Code of Conduct.
[x] I've searched for any related issues and avoided creating a duplicate issue.

Bug Report
Question. Not a Bug
I have a Home Tab published that has some buttons, whose actions differ based on values from a DB.
For example:
I would have a flag from DB like flag=1 or flag=2
And in the home page,  i would have 2 buttons:
Button 1 when flag is 1 and it changes flag to 2
Similarly Button 2 changes flag from 2 to 1
Although the change occurs in the DB, it is not reflected in the Home Page unless Refreshed or toggled to the Message tab and back
My question is that, can I trigger the app_home_opened event after updating the DB?
PS: I tried using views.publish, it is not possible as there are many more similar buttons, texts, etc, that they are a pain to call the DB each time
Also can I redirect directly to the Home Tab after the auth process without the use of slack:// ? If I use https://slack.com/app_redirect it redirects me to the messages tab
[Avoiding slack:// because it does not work in browsers]
Reproducible in:
package version:
node version:
OS version(s):
Steps to reproduce:

Expected result:
What you expected to happen
Actual result:
What actually happened
Attachments:
Logs, screenshots, screencast, sample project, funny gif, etc.

Regarding the title, the short answer is that it's not possible to trigger app_home_opened events without user actions.
I may not fully understand what you want to do yet but if your goal is updating all (or some) Home tabs in advance once a configuration in your database has been changed, you can call views.publish with all Slack user ids at the timing. The renewed Home tab will be displayed when a user accesses next time.
Also, having the last updated timestamp for Home tabs in your database may be worth considering. With the data, your app can skip unnecessary refresh on Home tabs when app_home_opened events occur.

Ok, cool. What about the redirecting to home page?

Also can I redirect directly to the Home Tab after the auth process without the use of slack:// ? If I use https://slack.com/app_redirect it redirects me to the messages tab
[Avoiding slack:// because it does not work in browsers]

@sanju-27
This is a bit tricky but https://app.slack.com/client/{team_Id}/{DM id}/app may work for you. You can acquire the {DM id} value by calling conversations.open API method with the target user id.

Thanks mate!


Make link Copy

We can do this since Cid will be move soon, and it is just a good idea to have something very simple as the link.
Also change the tests to no longer rely on anything but sha2. Whether we produce correct IPLD is completely irrelevant for the banyan tests, which are only supposed to make sure the tree works.

Implements #27


Provide ability to configure dapr grpc ports through dapr pod annotations

Description
Provide ability to configure dapr grpc ports through dapr pod annotations
Issue reference
Please reference the issue this PR will close: #8227
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list:

[x] Code compiles correctly
[x] Created/updated tests
[x] Unit tests passing
[x] End-to-end tests passing
[x] Extended the documentation / Created issue in the https://github.com/dapr/docs/ repo:dapr/docs#4400
[ ] Specification has been updated / Created issue in the https://github.com/dapr/docs/ repo: dapr/docs#[issue number]
[ ] Provided sample for the feature / Created issue in the https://github.com/dapr/docs/ repo: dapr/docs#[issue number]

Thanks for the PR!
You also need to make sure the sidecar container is configured with the --dapr-internal-grpc-port flag if the annotation exists. This is done here: https://github.com/dapr/dapr/blob/master/pkg/injector/patcher/sidecar_container.go#L39
In addition, the Dapr Operator needs to examine the annotations of a Dapr annotated resource and configure the Service that it creates with the right port. This is done here: https://github.com/dapr/dapr/blob/master/pkg/operator/handlers/dapr_handler.go#L265

You also need to make sure the sidecar container is configured with the --dapr-internal-grpc-port flag if the annotation exists. This is done here: https://github.com/dapr/dapr/blob/master/pkg/injector/patcher/sidecar_container.go#L39
From what I can tell this is already taken care of by pulling the port values mapped to the annotations... Am I reading this wrong?

You also need to make sure the sidecar container is configured with the --dapr-internal-grpc-port flag if the annotation exists. This is done here: https://github.com/dapr/dapr/blob/master/pkg/injector/patcher/sidecar_container.go#L39

From what I can tell this is already taken care of by pulling the port values mapped to the annotations... Am I reading this wrong?

Yes, that's right! So the only place left to modify is the Service creation logic in the operator

I've posted a PR to the dapr/docs repo to reflect the changes: https://github.com/dapr/docs/pull/4401

Yes, that's right! So the only place left to modify is the Service creation logic in the operator
PR updated with Service creation logic and tests

@passuied see the linter errors in dapr/static checks

Thanks @passuied

Small lint issues

@holopin-bot @passuied Thank you PAtrick!


cmd/go: fails when main module is in a 9P network share on Windows Subsystem for Linux

What version of Go are you using (go version)?

$ go version
go version go1.14 windows/amd64

Does this issue reproduce with the latest release?
It is the last release
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
set GO111MODULE=on
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\a\AppData\Local\go-build
set GOENV=C:\Users\a\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS= -mod=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOINSECURE=
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=C:\Users\a\go
set GOPRIVATE=
set GOPROXY=direct
set GOROOT=C:\Go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=Z:\home\a\go\graph\go.mod
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\a\AppData\Local\Temp\go-build115528494=/tmp/go-build -gno-record-gcc-switches

What did you do?
I'm using Windows Subsystem for Linux 2 and I access my files using a network driver. I tried to use go mod init in a new project and got this error :
a@Hackintosh-Windows MINGW64 /z/home/a/go/graph
$ go mod init graph
go: creating new go.mod: module graph
go: updating go.mod: Lock Z:\home\a\go\graph\go.mod: Fonction incorrecte.

(Fonction incorrecte means incorrect/invalid function)
Then i tried to create it by end with the content :
module graph

go 1.14

Running go list -m (or any command requiring this file actually) gives me this error : go: RLock Z:\home\a\go\graph\go.mod: Fonction incorrecte.
What did you expect to see?
my go.mod file created.
What did you see instead?
An error about Lock/RLock.
More information:
After reinstalling go 1.13.8, i had everything working back.

Thanks for the report.
The Windows Subsystem for Linux is not a supported platform. The fact that it accidentally worked on Go1.13 does not necessarily mean that it will keep working going forward. We don't have a builder (since it's not a supported platform), so breakage may happen.
I'm closing this issue, but please feel free to comment if you can reproduce this on plain Windows or on Linux; and we'll re-open.

Can the support of WSL2 be considered or included into roadmap?
WSL2 is becoming a popular platform as it soothes many pains of development under Windows.

@artsafin See https://golang.org/wiki/PortingPolicy .
That said, I thought the goal of WSL was to permit running GNU/Linux programs on Windows.  It ought to work to run GOOS=linux go build to get a GNU/Linux binary and then run that binary under WSL.

That said, I thought the goal of WSL was to permit running GNU/Linux programs on Windows. It ought to work to run GOOS=linux go build to get a GNU/Linux binary and then run that binary under WSL.

The problem here is when your code lives within the WSL2 VM, but you're working on it via the \wsl$ network share in your IDE / toolchain. A lot of us have adopted this since it allows us to code in Windows, but do all testing / verification in Linux.
The go binary fails to lock the needed .mod or .sum files when called with the wsl$ network path and subsequently fails. I suspect this will probably happen with all network shares in Windows.

It's just that it's not happening with go 1.13, it would be nice to be able to disable the rlock feature

Another one here with the same problem. This issue makes working in Goland a chore... Each time I add a library to the project I have to copy the project to the Windows drive and download modules there...

It's possible to workaround the issue by launching IDE inside WSL connecting it to X server installed on Windows host.
However native support of working on network shares would be much appreciated.

Many more people are in need of this. Having an option to disable the file locking would make it work

We don't have a builder (since it's not a supported platform), so breakage may happen.

As it just so happens, we now have a WSL builder thanks to @mengzhuo (https://github.com/golang/go/issues/17365#issuecomment-737626523), so I think we can reopen this issue.

(That said, the cmd/go tests are currently passing on the WSL builder because the tests are not using a network share for the working directory.)

@ld100

The issue is not about WSL2 itself, but about Go being able to work on Windows with files on the share via P9 protocol.

Note that the 9P protocol does support file-locking — cmd/go's internal/lockedfile package has a Plan 9 implementation and it seems to work reliably. (The Go project's Plan 9 builders are failing frequently at the moment, but the cause of the failures does not appear to be related to file-locking.)
So it seems that the root problem here is an incomplete 9P implementation in WSL, for which @kamijin-fanta has helpfully filed https://github.com/microsoft/WSL/issues/5762.

Having an option to disable the file locking would make it work

The go command locks files in order to prevent data corruption in both the Go module cache (#26794) and the main module's go.mod and go.sum files.
We had originally only used file locks in the module cache, instead preferring atomic renames for the go.mod and go.sum updates. However, the rename approach resulted in spurious changes to file permissions (#34634) and spurious errors on Windows due to certain idiosyncrasies of the Windows file APIs (#32188, #36568). So in Go 1.14 we switched to using file locks for the go.mod and go.sum updates as well.

(That said, the cmd/go tests are currently passing on the WSL builder because the tests are not using a network share for the working directory.)

Is there a way to get involved in setting this up? I do have the time for it, but I don't know how to contribute to this.

Honestly, this seems like a niche enough use-case that I would be satisfied with a test that only fails locally. (This particular part of cmd/go seems pretty stable and is unlikely to regress.)
That said, since this is an upstream bug (an implementation deficiency in the WSL2 filesystem) and there is what seems like a straightforward workaround in the interim (use a working directory outside of the 9P share), I'm not sure that it's worth adding a lot of complexity to cmd/go itself to deal with this case.

I also do think that added more complexity than needed is a good thing. However, or https://github.com/golang/go/pull/4299 seems a good way to deal with this issue (and others) when locking is not available (for some reason). Once (IF!) wsl2 implements plan9 locking correctly, no need for any changes would be needed, and we would be safe for other types of file-systems that will be thrown in the wsl (or other system) pool that we do not know of.

@jaytaph

Once (IF!) wsl2 implements plan9 locking correctly, no need for any changes would be needed,

We already should not require any changes once the Windows 9P implementation supports LockFileEx correctly.

and we would be safe for other types of file-systems that will be thrown in the wsl (or other system) pool that we do not know of.

Given that ignoring file-locking errors can lead to silent corruption of the affected files, “safe” is definitely not the word I would use. 😒

Please tell me, where can I find the test code for plan9?  I thought it wasn't working properly in plan9.

@kamijin-fanta, the tests in lockedfile_test.go and transform_test.go should run on Plan 9 the same as on every other platform.
There is an additional integration test in mod_concurrent.txt that I believe also runs on Plan 9.

(The last Plan 9 file-locking bug I'm aware of was #38719, which we fixed by using lockedfile.Read in even more places. 😅)

Thanks to you, I understand that Plan 9 implements a lock that doesn't use filelock.Lock here.
https://github.com/golang/go/blob/go1.15.6/src/cmd/go/internal/lockedfile/lockedfile_plan9.go
If the file system does not support locking, can it be implemented using lock files? Create a lock file in the TMP directory, etc. to control the lock. I'm thinking of implementing apt like /var/lib/apt/lists/lock. But this is an ad hoc fix for only WSL.

Hi!
I just came here due to the same problem as described on StackOverflow. @bcmills, you have mentioned that on Unix systems you are using flock. I see flock installed on my system, but the problem persists.

$ go mod init example/hello
go: creating new go.mod: module example/hello
go: updating go.mod: Lock /home/pkus/temp/hello/go.mod: function not implemented

How can I resolve it?
Thanks!

I am now having this problem too: using github.com/u-root/cpu, i.e. a 9P2000 mount on Linux, and the gvisor 9P package, which does not support Tlock.
While the use of flock may be fine on a local file system, depending on file locks to work on any network file system has always been a hazardous undertaking; even the most simple search for rpc.lockd bugs is revealing.

I'd suggest that the build command continue if the error is "not implemented." There is little else that can be done in that case, and it is seems sensible to me to, at most, print a warning, but not actually exit with a fatal error. It may not be possible for people to swap out their kernel or their network file system protocol. I'm happy to submit a PR if that is acceptable.

Ah somebody beat me to it, I'll take a look at that PR. Again, the situation in my case is a small IoT running Go, over 9P2000. The 9P2000 Go package I'm using does not have Tlock support atm, and it is literally a single user situation, in the IoT case.


3.0 update: getting-started-with-swashbuckle

getting-started-with-swashbuckle

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 14fce65f-1337-58cb-2193-8d8e0e62792d
Version Independent ID: 59222460-a971-e76e-4fe9-23d4d7d768ee
Content: Get started with Swashbuckle and ASP.NET Core
Content Source: aspnetcore/tutorials/getting-started-with-swashbuckle.md
Product: aspnet-core
Technology: aspnetcore-tutorials
GitHub Login: @zuckerthoben
Microsoft Alias: scaddie

@spboyer has already started 3.0 updates for this one. Assigning to him to complete.


Unable to scroll list on mobile

Adjusting the delay before the start of the drag might be a good. But for now, I'm going to close this issue.


Summary data column data type returns nothing but strings

sheet.getSummaryDataAsync({ignoreSelection: true}).then((data) => {
The column meta data contained in data.columns[i] has the attribute dataType which presumably is supposed to return string, float, int, date, etc.
However it seems to always be returning the value 'string' even when it's obviously not a string type:

Hi Craig:
Thanks for your report. We have fixed this in house. It should be fixed in the next beta update. Thanks for working with extensions. We are excited to see what developers are building.
John

I think this is a duplicate of #41. Is the GetUnderlyingDataAsync() call fixed as well?

Yes, both are fixed in 2018.2.


YouTubeClone

🛠 Fixes Issue #497
👨💻 4html , 1 css , 1 YouTubeClone image folder Added
✅ Check List (Check all the applicable boxes)

[x] My code doesn't break any part of the project (Zero Octave-Javascript-Projects).
[x] This PR does not contain plagiarized content.
[x] My Addition/Changes works properly and matches the overall repo pattern.
[x] The title of my pull request is a short description of the requested changes.

📷 Screenshots

Required changes has been done @Astrodevil

Changes are not properly reflected on README and cards.json link should be ("Public/YouTube_Clone/index.html")

i think now its ok @Astrodevil


A few functional test improvements

Moved functional test output files to test/output/ directory.
Renamed gdb_script.py to gdb_test_script.py.
gdb_test.py:

Use FPB version in check to ignore hw bp.
Fix some incorrect remote monitor commands.

flash_loader_test.py: removed unused global variables.
debug_context_test.py:

Fix hard coded addresses.
Removal of unused definitions.
Additional cleanup.
Add ElfReaderContext test.

commands_test.py: fix some incorrect test commands..
Add mock to tox testenv for python < 3.3.

/morph test

/morph test


source_map_pub_build_validity_test fails with dart2js

dart2js/source_map_pub_build_validity_test started failing with revision 40619.

This issue has been moved to dart-lang/pub#1144.


Update homepage

Related Issue
No response
Description
Update the homepage to be more like the /why-flowfuse page

Hi @ZJvandeWeg @iskerrett I opened this issue to discuss the homepage update here.
Here's a quick mockup, with the same content we have in the why FlowFuse page. I can start working on updating the code while Ian updates the content and create the new video.

Compliance is about what Node-RED versions one is running, understanding which custom nodes are installed, tracing what changes in that regard where made. Furthermore, no more sharing passwords and because they now don't full audit logging is available. Which again helps with remaining compliant on the customers' side.
Collaboration features is more around effectively working together. Sharing knowledge etc

I think there is some overlap with the team video I prepared. When I spoke to Nick about the 6 reasons he pointed out that the real advantage of FlowFuse for team was you can do it securely with audit logs. Here is the script for video #4. https://docs.google.com/document/d/1WZrOC2rxOauQFaocjYLI06sJuB23EbFxXMfajTjVV3w/edit?usp=sharing
I think it is fine to having overlap but I just want to point it out.
How do you see custom nodes in FlowFuse? I am not sure how to demo that.  For tracing changes, is this the audit log for an instance or are you thinking of something else?
For real compliance, I think SOC2 certification will be a key point too.

@iskerrett I like the script, and while there's some overlap with compliance, I don't think it's a lot. Though almost all compliance requirements include a line about not sharing usernames and passwords, which is something the Node-RED community should leave behind. Agree that this minor overlap should be fine.
I think custom nodes in the messaging would be selling roadmap items, next release onwards FlowFuse allows you make a subset of nodes available for your developers. Not all. That's a huge benefit to not run untrusted code.

@Yndira-FlowForge Can we move the social proof logos to right under the video and make the page more dense? The Flow feels off this way.
Additionally I wonder if "Why FlowFuse" should be more like Confluent; Achieve Node-REDs full potential with FlowFuse. WDYT?

I'd be fine with shipping this screenshot as first iteration, and keep iterating over the next weeks. Is that possible?

Yes! I just push that change, should I remove the /why-flowfuse page?

I think so, yes.

Can we move the social proof logos to right under the video and make the page more dense? The Flow feels off this way.

This has been done. I agree with you about the flow of the page. I considered this when I initially added the logos, but I thought that it might result in fewer users clicking the "What is Node-RED" link, and at the time, that seemed more important than the social proof.

Additionally I wonder if "Why FlowFuse" should be more like Confluent; Achieve Node-REDs full potential with FlowFuse. WDYT?

Perhaps, instead of replacing the "Why FlowFuse" text, we could add that text before Nick's video? All the other video scripts start with "reason number XX," like the answer to the "why FlowFuse" question. We could also edit all the videos, remove that phrase, change the intro graphics, and remove the numbers next to the titles, but that could be part of the next iteration... What do you think? @ZJvandeWeg @iskerrett


Added global lua function CreateBlankObject (#652)

Resolves #652
Testing
Built UE4SS and deployed in Abiotic Factor.
Tested with Lua code:
local blankObject = CreateBlankObject()
print("blankObject varibale type: " .. type(blankObject))
if blankObject then
	print("blankObject userdata type: " .. blankObject:type())
	print("blankObject IsValid:" .. tostring(blankObject:IsValid()))
end

Result:
[12:40:32.1231285] [Lua] blankObject varibale type: userdata
[12:40:32.1231360] [Lua] blankObject userdata type: UObject
[12:40:32.1231428] [Lua] blankObject IsValid:false

Additional
Fixed FindFirstOf return type annotation in Types.lua
Documentation
All changes documented in Changelog.md and created a new docs page for CreateBlankObject.

Can someone just Clone the branch from my fork, compile and test it locally, then just force merge?

I think "Blank" is a bit confusing.  Maybe dummy or empty?

I think "Blank" is a bit confusing. Maybe dummy or empty?

Perhaps "CreateInvalidObject" is even more accurate to what the function actually does ?

I guess CreateInvalidLuaUObject is too verbose

I guess CreateInvalidLuaUObject is too verbose

Yeah I don't think "LuaU" is necessary, and besides, we might reuse this function at some point for non-UObject stuff so it's nice to keep the "U" out of "Object".
It really doesn't have anything to do with UObject anyway, it's just a function implemented for UObjects among other objects.

Tested;
local invalidObject = CreateInvalidObject()
print("blankObject variable type: " .. type(invalidObject))
if invalidObject then
	print("blankObject userdata type: " .. invalidObject:type())
	print("blankObject IsValid: " .. tostring(invalidObject:IsValid()))
end

Result:
blankObject variable type: userdata
blankObject userdata type: UObject
blankObject IsValid: false


Update controller with latest code-generator and runtime

Issue #, if available:
Description of changes:
In order to make use of recent code-generator and runtime features, we want to refresh the generated code in the controller.  This is just a regeneration and should contain no functional changes.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

/lgtm


Updated Kotlin to stable version 1.1.1 removing unneeded eap reposito…

…ries. Also removed unneeded srcSets declaration.
Using kotlintest is requiring to use eap repositories which should not be needed now that Kotlin 1.1 is stable. Could you generate a new version of kotlintest with this so it can be used without issues in Kotlin 1.1 projects?

Can you PR this against the 2.0 branch please.

Done on #166 although there the eap repositories where already gone so that was not needed. Does this mean that the 2.0 branch is going to produce a release soon? If not, i still think it would be good to release a 1.x version with Kotlin 1.1.1

2.0 will be released this weekend.

Great!


Fix code generation for local functions declared by let rec

This PR fixes the problem that local functions declared by let rec doesn't work in code generation before.

@chengluyu in case you didn't notice: the PR needs to be fixed.

Thanks for the reminder. Let me confirm. Besides conflicts, is there anything else I neglected?


[FR] - Node Release Notes Suggestions

Original Source: https://docs.google.com/document/d/1Sf8HJNfdu-8equF991_NOaZE1vcJiN0fs6cy0z5G_Mg/edit?usp=sharing
Example mithril release notes: https://github.com/input-output-hk/mithril/releases/tag/2450.0
Cardano Node Release Notes Suggestions
Having the repos done in a manner in which we assume this is the first time a user has visited the repo will help document and provide all the needed info. As a small pool and an admin of the xSPO Alliance, an alliance for small pools under a million ada delegated when they join or for brand new pools, we receive a lot of questions that would be eliminated by better documentation on the repo. We see errors from using the wrong version on the network, to not updating config files correctly.
I believe the Mithril team and repo is the gold standard of how the repos should be done.

Suggestion 1
Clear callout on what network node version is recommended to be used on.

Have a callout like Mithril does in release notes would great help so people don’t make a mistake
Also have a network Compatibility Chart right in repo

Suggestion 2
Include in release notes if there is a configuration file change needed.

Also like Mithril does, they let us know if a configuration update is needed adding to repo would help as well.

Suggestion 3
Have the versions listed right in repo

My comments:
Suggestion 1: Agreed! We'll try to change the template to have this some time in Q1 next year
Suggestion 2: Would you like something like NEW after the link to the configuration files if there are any changes? We made the assumption people download configs from the book every release, but if people don't, I could see that being useful
Suggestion 3: Do you not like the collapsed list? Happy to remove all the collapses if they cause more harm than good. As engineers we thought hiding the details would draw people to the important information and users could epand the sections they care about. I'm open to getting rid of the collapses. It definitely makes the markdown uglier to implement it.

I like the collapsed lists.

I agree with all the suggestions, but a collapsed format would also be acceptable.
Additionally, it would be helpful if the presence or absence of DB replays is indicated for each lower version.
For example, in the case of 10.1.3:
9.2.1 or below : Required
10.1.1 or above: Not required


[opentelemetry-cpp] Update opentelemetry-proto dependency version to 1.3.1

Fixes #39830.
The last time when opentelemetry-cpp got updated to 1.16.0, its corresponding dependency version, opentelemetry-proto, which gets downloaded via portfile.cmake did not get updated.
But if you look at the https://github.com/open-telemetry/opentelemetry-cpp/tree/v1.16.0/third_party, the git reference for opentelemetry-proto it has, is for 1.3.1:

Closing in favor of #39830.


Release 1.2.3

Linter check found the following problems:
The following problems have been found:
ERROR: /tmp/abs_25i8fsl7lf/clone/recipe/meta.yaml:1: cython_needs_compiler: Cython generates C code, which will need to be compiled
ERROR: /tmp/abs_25i8fsl7lf/clone/recipe/meta.yaml:25: missing_wheel: For pypi packages, wheel should be present in the host section
ERROR: /tmp/abs_25i8fsl7lf/clone/recipe/meta.yaml:56: missing_license_family: The recipe is missing the about/license_family key.
Errors were found

Linter check found the following problems:
The following problems have been found:
ERROR: /tmp/abs_46f8qe0g9o/clone/recipe/meta.yaml:21: cython_needs_compiler: Cython generates C code, which will need to be compiled
Errors were found

Close because of v1.2.4 https://github.com/AnacondaRecipes/spacy-transformers-feedstock/pull/7


Mozart in a container?

In the spirit of #13 ("could you release a binary") I suggest releasing a version in a Docker container to reduce the pain of installation.

That's a good idea.

Please! I do not understand how to install this at all and decided it would take less time to manually enter in every note into Sibelius.


Zip and UnZip steps

@reviewbybees

Thank you for this pull request! Please check this document for how the Jenkins project handles pull requests.

This pull request originates from a CloudBees employee. At CloudBees, we require that all pull requests be reviewed by other CloudBees employees before we seek to have the change accepted. If you want to learn more about our process please see this explanation.

the code looks ok - but the user api seems like it could do with some improvements.
the read option of unzip should IMO return a array of contents - or even a map<String,String> keyed file filename with the contents - otherwise for multiple files it is not so useful.
this may need to be a different step to unzip (to allow different returns)
The embedding of a folder name into the zip looks weird (probably too much effort to workaround)?
Zip files can escape the workspace - to read/write sensitive files so can 'sh' commands - but the docs mention only relative files.  so either the behaviour should be fixed or the docs corrected.

@jtnord I believe I've addressed all your comments (that I agree on) :)

:bee:

:bee:


Extra unit data

Need to add extra unit data to the database, such as
Description
Copied from the wiki into a text field
Limit breaks
Unit hasMany Limits, and Limits belongTo Rarity. So that a unit's various limits can be expressed properly.
Refactor rarities
The rarities need to be refactored so that Units.base_rarity belongsTo Rarity and Units.max_rarity belongsTo Rarity Completed in 506c280ae4b65c04f26ef9be4a16fa1ed20412da
Unit images
Need to upload an image for each unit
Acquired units
This should also include the trust of the unit

Completed the trust, and unit images.


What is the meaning of 'path' in accessors?

has/get/getAll take a path but don't do anything with it at the moment.

https://github.com/bsittler/async-cookies-api/issues/4 is somewhat related.
When I was sketching a similar design (https://github.com/slightlyoff/ServiceWorker/issues/707#issuecomment-187732390) I couldn't settle on "match" or "get". "get" doesn't map well.
WIth the singular get/match, "name" is required, it doesn't make sense otherwise. With getAll/matchAll the name is optional. It feels like the APIs should reflect that. Eg:
navigator.cookies.match(name, { path });
navigator.cookies.matchAll({ name, path });

In the singular match, I'm not sure what the default path should be, maybe it should be required too.
Additionally I can't decide if "path" should be treating the path as a key, or a scope. Eg:
navigator.cookies.matchAll({
  path: someRequest.url
});

Should the above return me all cookies with their path set to someRequest.url, or should it return me all the JS-visible cookies that would be sent along with a request to someRequest.url?

I think trying to fit this into a map-like shape is confusing things.
Maybe it should be simpler?
getAll - takes no arguments, returns all the cookies for the domain. This means you can get multiple entries with the same name but different paths. Filtering is left to the developer.
No get method to avoid confusion around defaults and how "path" works.
forURL(url) - returns the JS-visible cookies that would be sent along with a request to url. url could default to the client url, making forURL() return the same set of cookies as document.cookie. "name" would be unique in the returned cookies, so it could be a map.

returns all the cookies for the domain

Hmm, I guess it should only be "cookies for this origin and parent origins". Exposing cookies targeted to other subdomains would be bad.

Exposing paths and/or domains is new information not currently visible on
the web. Cookie:/reading document.cookie does not tell you the path or
domain, only the name and value.
Allowing the path to be specified seems OK, but I think requiring it is
odd, at least in document contexts. I think it should default to the path
of the current page.
On Mar 9, 2016 04:45, "Jake Archibald"<EMAIL_ADDRESS>wrote:

returns all the cookies for the domain
Hmm, I guess it should only be "cookies for this origin and parent
origins". Exposing cookies targeted to other subdomains would be bad.
—
Reply to this email directly or view it on GitHub
https://github.com/bsittler/async-cookies-api/issues/10#issuecomment-194280416
.

(Also, specifying a read path just means you get back all cookies in-scope
at that path, including those set at parent paths.)
On Mar 9, 2016 06:09, "Ben Wiley Sittler"<EMAIL_ADDRESS>wrote:

Exposing paths and/or domains is new information not currently visible on
the web. Cookie:/reading document.cookie does not tell you the path or
domain, only the name and value.
Allowing the path to be specified seems OK, but I think requiring it is
odd, at least in document contexts. I think it should default to the path
of the current page.
On Mar 9, 2016 04:45, "Jake Archibald"<EMAIL_ADDRESS>wrote:

returns all the cookies for the domain
Hmm, I guess it should only be "cookies for this origin and parent
origins". Exposing cookies targeted to other subdomains would be bad.
—
Reply to this email directly or view it on GitHub
https://github.com/bsittler/async-cookies-api/issues/10#issuecomment-194280416
.

Exposing paths and/or domains is new information not currently visible on the web. Cookie:/reading document.cookie does not tell you the path or domain, only the name and value.

Right, but should we carry on that tradition? I can work out the path of cookies by loading an iframe and brute forcing the url & seeing how document.cookie changes.

Allowing the path to be specified seems OK, but I think requiring it is odd, at least in document contexts. I think it should default to the path of the current page.

If you can specify the path, you make the above hack even easier.

(Also, specifying a read path just means you get back all cookies in-scope
at that path, including those set at parent paths.)

I don't disagree with that behaviour, but it makes this very un-map-like. The meaning of "path" in get/set becomes quite different.

My only intent when including a path argument was to allow a ServiceWorker to see script-visible cookies which would be in-scope for a given Fetch interception.

Yep, it's a good use-case

"name" would be unique in the returned cookies, so it could be a map.

No it wouldn't. TIL multiple cookies of the same name are sent in this case.

Right, but should we carry on that tradition?

I think we have to, otherwise this API is useless. The original point of this API was to allow people to manage cross-site logins in their service workers.

@domenic I was referring to exposing the path of a cookie. Discussion split off into https://github.com/bsittler/async-cookies-api/issues/11

I've attempted to address this issue in the explainer (where path is called 'url' instead). Please take a look there and let me know what you think.
In particular, I think the IFRAME-based brute-forcing is preventable by a server rigorously sending X-FRAME-OPTIONS: DENY provided the user isn't tricked into allowing a pop-up. What do you think?

Fixed explainer link

Polyfill for document contexts and explainer are synced now on this issue. Re-open if you think the path restrictions are problematic (and explain why, please!)


Amendment status change requires refresh to update pending actions from [5]

Describe the Bug:
Probability (how likely the bug is to happen, scored from 1-5): 3
(For example, probability of 5 is something like "it happens to all users every time they log in."
Probability of 1 "only happens to certain users when a really specific and unlikely path is followed.")
Effect (how bad the bug is when it does happen, scored from 1-5): 2
(For example, effect of 5 is "the entire app crashes and makes it unusable for all users" or "the bug causes the wrong data to be saved, with critical information (e.g. payment) being affected."
Effect of 1 is "It makes some styling look a little bit weird.")
Steps to reproduce the behaviour:

navigate to the amendments page
change the project status to something other than draft and click update
pending actions from should be readonly but is still available
navigate away and come back
now pending actions from is correctly readonly

Screenshots:
https://www.loom.com/share/62a16898a5844017bce45939c47e1439
Additional information:

OS: [e.g. iOS]
Browser: [e.g. chrome, safari]
Version: [e.g. 22]
Additional context

Thank you @Sepehr-Sobhani - I can no longer recreate the bug.
An observation: I can't seem to submit a revision that is an amendment - even when it says it is applied it is considered in progress.

Thank you @LindsayMacfarlane.
Submitting an amendment/revision based on the status is still in progress and captured in this ticket: https://app.zenhub.com/workspaces/climate-action-secretariat-60ca4121764d710011481ca2/issues/gh/bcgov/cas-cif/1293
For now, the only way to submit a revision is to follow below steps:
clicking on the Resume Edition button on any page/form -> clicking the Submit Changes header -> clicking the Review and Submit Information sub-header -> filling in the reason for changes box -> hitting submit button


Add SSR Support

Summary
When using Apex Charts with SSR when importing the module Apex Charts tries to access window immediately because it uses top level calls in other imported modules. This causes apps using SSR to break when using the library because window is not accessible on the server. Components using the library have to be client rendered to work.
I am not super familiar with the library but I have just skimmed over to try and find any top level window calls.
Here are a few I found:
/modules/helpers/InitCtxVariables.js
// global Apex object which user can use to override chart's defaults globally
if (typeof window.Apex === 'undefined') {
  window.Apex = {}
}

./svgjs/svg.js

Includes an IIFE with multiple top level window calls

./libs/Treemap-squared

Another IIFE with top level window calls

There are other issues open for SSR users already like:

#4176

API Changes

Maybe an init method wrapping the window calls so that users can determine when the code is loaded

Intended Use Case
Anyone using Sveltekit / Next.js / Remix or any other SSR framework
Current Work Around

Using the CDN (Which isn't great if you are using type checking)
SvelteKit users can add this code to their +page.server.ts file to client render components that use Apex Charts

export const srr = false;

Next.js users have to put "use client" at the top of their components

Issue recreation
https://github.com/ieedan/apex-charts-ssr
Steps:
pnpm install
pnpm run dev

Should see 500 error now
If you uncomment the CDN from app.html and comment import ApexCharts from "apexcharts" at the top of +page.svelte then it should render the chart with no issues.

This is still a problem.

This is still a problem.

Do you think svgdom will help? @junedchhipa

still a problem

This is also an issue with tests. I have a dependency that uses apexcharts, so when I import my dependency, Apex immediately tries to access window. I can only mock out the entire dependency, but then I'm mocking more than I'd like

@junedchhipa Can this get some love please?

please

@junedchhipa Can this get some love please?


Improve the Entries in Leaderboards and Software-Overviews

Right now, entries in the leaderboards or Software overviews look like:

I would like to add more details to the entries, like the following:

I slightly adopted the ui of https://ir-datasets.com/ in the browser a bit to handle our use-case.
I would imagine something like this in the "run it locally" command":

This is implemented


DT-2030: BWS Ida B Wells forward and back buttons

https://digitalpubliclibraryofamerica.atlassian.net/browse/DT-2030

Looks good!


snap to coordinates

I'm thinking about an option to have inactive waypoints from other plannings on a map and that you are limited to only use these coordinates for a new plan.
They are shown as markers on the map too. if you get close to a marker this gives a signal and you can drop your waypoint on that.

We are magnetic to "locations" already. Making those "inactive waypoints" into locations would fulfill that.
We typically add important (named) points to the settings. could be automated, obviously.
Accepting only those would be not so good, I guess.

Collecting past waypoints might be a smart idea. Certainly accessing all known radio beacon and similar waypoints in a data base might be useful (especially for adding proper waypoint names.
However, retaining a history from past plannings adds a "state" to the software which is different between users, requires a management interface for the removal of, e.g., waypoints with typos and adds a  lot of complexity for testing.
Any database would need to be local and from past experience those things are pretty expensive and often protected.

Differrently implemented.


Use Expo release channels instead of package namespacing

Expo has rolled out support for official release channels. These are a lot more elegant way of what we are currently solving by namespacing the package name with a branch name.
PR #22 adds release channel support. The scope of that PR is to use release channels as separate argument, but instead we might want to just use that as the primary mechanism.

Fixed in 2.0: https://github.com/FormidableLabs/appr/releases/tag/v2.0.0


Worker possibly destroying PVC Early

I have a brigade script that spins up a bunch of containers who's processes take anywhere from 10-50min to complete.  After about 30 minutes, brigade apparently destroys the persistent volume all of the pods are using, and the ones that haven't completed yet fail.  I get a "pod failed to run to completion" error from the brigade output and see a PersistentVolumeClaim is not bound: "brigade-worker-01ce45w7t0ssmq05ey4bmp9w1g" (repeated 5 times)  error after 30 minutes of the pod running.
I tried setting the Job.timeout variable in my brigade.js, but it didn't have any effect.  This is the main logic of my brigade.js:
  for(i=0; i<20; i++) {
    console.log(servers[i])
    var jobName = "adltocsvadl-"+servers[i]
    jobName = jobName.substring(0,32).toLowerCase()
    var job = new Job(jobName, image)
    job.timeout = 10000000
    job.tasks = ["/app/datalakeToCSVDataLake.sh -y /mnt/brigade/share -s " + servers[i]  + " -d 20180417"]
    job.storage.enabled = true
    job.run()

  }

 Error: Pod adltocsvadl-ch12abcdefg-01ce45w7t0ssmq05ey4bmp9w1g failed to run to completion

  - k8s.js:367 k.readNamespacedPod.then.response
    ./dist/k8s.js:367:32

 [brigade:app]   Error: job adltocsvadl-ch12labcdefg(adltocsvadl-ch12abcdefg-01ce45w7t0ssmq05e  y4bmp9w1g): Error: Pod adltocsvadl-ch12abdefg-01ce45w7t0ssmq05ey4bmp9w1g failed to run to completion

  - brigadier.js:56 jr.run.catch.err
    ./dist/brigadier.js:56:35

  - next_tick.js:188 process._tickCallback
    internal/process/next_tick.js:188:7

 [brigade:app] error handler is cleaning up
[brigade:k8s] Destroying PVC named brigade-worker-01ce45w7t0ssmq05ey4bmp9w1g
[brigade:k8s] default/adltocsvadl-ch12abcdefg-01ce45w7t0ssmq05ey4bmp9w1g phase Running
[brigade:k8s] default/adltocsvadl-ch12abcdefg-01ce45w7t0ssmq05ey4bmp9w1g phase Running
error Command failed with exit code 1.

When I run kubectl logs , I see an error indicating that the pod no longer can access the persistant volume it needs to process its files.  The first error I see after 30 minutes of running is a "PVC not bound" error, so I'm guessing brigade is spinning down the persistent volume after a 30 minute threshold.
$ kubectl logs adltocsvadl-ch12abcdefg-01ce45w7t0ssmq05ey4bmp9w1g
Datalake Metaverse to Datalake CSV Run Started at Tue May 22 15:01:11 UTC 2018
Processing the following servers for this run ->
PROCESSING RUNNING IN /mnt/brigade/share/tempdir_16309
Executing
python3 /app/datalakeToCSVDataLake.py -y /mnt/brigade/share -s ch12abcdefg -d 2                               0180417
20180417
Traceback (most recent call last):
  File "/app/datalakeToCSVDataLake.py", line 605, in <module>
    sys.exit(main(sys.argv))
  File "/app/datalakeToCSVDataLake.py", line 176, in main
    processFiles(argsDict['local_file_directory'], argsDict['rawEvent'], start_d                               ate, end_date, servers)
  File "/app/datalakeToCSVDataLake.py", line 423, in processFiles
    dtValue = dtValue.replace('T', ' ')
AttributeError: 'list' object has no attribute 'replace'
Return code from Python = 1
cat: *.log: No such file or directory
Run Ended at Tue May 22 15:30:22 UTC 2018

Is there another way to increase the amount of time the brigade job runs for?

The PVC should not be destroyed until the worker pod itself is destroyed. It shouldn't be automatically cleaned up during processing. The log you show above seems to show the expected behavior: The container exits, then the error handler cleans up, then the PVC is destroyed.
That said, there could be a bug somewhere in Brigade.
The only timeout on a job is the one you mentioned (Job.timeout), and there are no timers on workers or on PVCs. One thing you could try is to see if you can run a second job when the first one fails, and connect that to the PVC.
job.run().catch( (err) => {
  checkPVC = new Job("checkpvc", "alpine:3.7")
  checkPVC.storage.enabled = true
  checkPVC.tasks = [
    "ls /mnt/brigade/share"
  ]
   checkPVC.run().then(res => {
    console.log(res.toString())
   })
})

That would indicate whether the PVC is being destroyed early, or if it's being detached early (but not yet destroyed), which might help us find the problem.
Also, what kind of volume is backing the PVC?

Any updates on this, @smm190 ?
Thanks!


Text Input Tile

First of all, I understand that this is not really an overall "issue". Apologies if this isn't the right place.
I integrated my Home Assistant with Google Assistant. I created some scripts so I can send a "broadcast"-command to the Google Home. This is all working great, but I miss the option in Tileboard to create a Text Input Tile.
That way, I can enter a custom message which will be send to the Google Home.
Is there any way I could so this? My Angular JS skills are basic at most.
It would look something like this:
https://i.imgur.com/f4aJ34Y.png

Maybe a tile like that would work for you:
                  {
                     position: [0, 0],
                     width: 1, height: 1,
                     id: {},
                     title: 'Say something',
                     type: TYPES.CUSTOM,
                     state: false,
                     action: function(item, entity) {
                          const text = prompt('What to say?');
                          this.apiRequest({})
                     },
                  },
``
The argument to `apiRequest` would have to be adapter to work with the specific API you want to call.

Does this work for you @nnielzz ?

@rchl Yep! Sorry for the late reply.
I already found a solution that's exactly what you suggested.
Thanks and happy holidays

@rchl After updating to the latest version of TileBoard. It seems like my code isn't working anymore.
My js knowlegde is limited, but I can follow code most of the time.
I managed to solve it previously by adding some code in the main.js (creating a new scope, if I'm saying that coreect)
Since the main.js file isn't in the directory anymore I tried to implement your code.
But...I'm receiving an "Message formatted incorrectly"-error message. (incorrect format)
I've created the following
`{
title: 'Aangepast Bericht',
width: 3,
height: 1,
items: [
{
position: [0, 0],
type: TYPES.CUSTOM,
title: 'Custom Message',
id: {},
width: 3,
customHtml: 'Bericht in Engels...',
                            action: function(item, entity) {
                                var text = document.getElementById("bericht");
                                this.apiRequest(item, {
                                    type: "call_service",
                                    domain: "rest_command",
                                    service: "assistant_broadcast",
                                    service_data: {
                                        command: text.value
                                    }
                                });
                           },
                        }
           ]
        },`

Image of what it looks like
You have any idea?

The rest_command.assistant_broadcast API must be enabled in your HA. You most likely have to define it manually first, as explained in https://www.home-assistant.io/integrations/rest_command/

Good suggestion, but I have already defined that in my configuration file.
I think I'm not using the apiRequest right.
I did some trail and error coding and figured it out.
See code below:
                        title: 'Aangepast Bericht',
                        width: 3,
                        height: 1,
                        items: [{
                            position: [0, 0],
                            type: TYPES.CUSTOM,
                            title: 'Custom Message',
                            id: {},
                            width: 3,
                            customHtml: '
<input type="input" class="form__field" placeholder="Bericht" name="bericht" id="bericht" ng-model="bericht" required />Bericht in Engels...

',
                            action: function (item, entity) {
                                var text = document.getElementById("bericht").value;
                                console.log(text);
                                document.getElementById('MsgClick').onclick =
                                    this.apiRequest({
                                        type: "call_service",
                                        domain: "rest_command",
                                        service: "assistant_broadcast",
                                        service_data: {
                                            command: text
                                        }
                                    });
                            },
                        }]


ac: convert to tonic

@bors-libra r=metajack

:pushpin: Commit dfc29fd has been approved by metajack

:hourglass: Testing commit dfc29fde166637572947930f9fa16d429799f1c4 with merge 1b7ae1ecefa45a195f2849c82a6391d580234a1d...

:sunny: Test successful - checks-circle_commit_workflow
Approved by: metajack
Pushing 1b7ae1ecefa45a195f2849c82a6391d580234a1d to master...

@bmwill  I think this is broke cluster-test https://our.internmc.facebook.com/intern/paste/P124206143/


Change in link of instagram in footer

Instagram link in footer section needs to change...
currently, the icon is directing again to the same page..
I would like to change the redirecting link to the instagram default link

Can you please assign me this issue...

Hey @ShaikHafiza, we don't have an Instagram account for Ezyshop at the moment. Once we create one, we'll let you know to add the correct redirection link.

for now I will add default link to this

@ShaikHafiza leave this for now.


Replace tipping contract with aens name

Fix the contract version check as we do not need to compare it after this PR is merged.


Improve RCA Testing Workflow

Fixes #:
Description of changes:

Annotating a test with @category(SlowTests.class) will cause the
default :test task to skip the test. These tests can be run as described
in the bullet below.

The :test gradle task will now only run a subset of fast tests by
default. To run the RCA Integration Tests (e.g. RcaItQueueTuning) you
must provide the -PrunITs=true flag to gradle. To run tests in the newly
added SlowTests category, you must pass -PrunSlowTests=run to gradle. So
the command to run all tests is ./gradlew test -PrunITs=true
-PrunSlowTests=true.

Workflows have been modified so that the PerformanceAnalyzerIT
Integration Test suite (the test suite that hits our APIs) runs on push
to the performance-analyzer-rca master or dev branches.

Workflows have been modified so that PRs undergo minimal testing,
while pushes to master or dev undergo the full suite of testing. If
there is an error on master, we should revert first and ask questions
later. In the future, we can automate this reversion flow.

Tests: N/A
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

I've broken the relevant pieces of this commit down into smaller PRs


updates for 1.7.0

Signed-off-by: MarkAckert<EMAIL_ADDRESS>

Pending ZLC vote, then submission of materials and S3 links.
This PR must have the new S3 links before merge.


Face

if you want to try out the Smile ID, don't wear any glasses. It only works for one person in front of the camera.

README.md and LICENSE have been restored.


test(todomvc): extent timeout

Current dependencies on/for this PR:

main

PR #2366   👈

This comment was auto-generated by Graphite.


change compliler to regular deps

I would propose to move cerebral-url-scheme-compiler as regular deps since npm@3 doesn't installs peerDependencies. On the other hand npm@3 will use only one copy of cerebral-url-scheme-compiler if all modules using it have compatible version range.
peerDependencies supposed to declare some limitations to modules not required in main sources (not tests) or declare that loading of separate instance of module should be avoided (like when we do require('react'))

@Guria yes, I was thinking about this.I wasn't sure that other modules were going to depend on schema compiler and how each would be affected.

Let each depend it just as regular. Having cerebral-url-scheme-compiler in app deps would be to annoying.


Login window for Database-Connection without title

Description
Unlike the previous version CE 23.3.3, the login windows for the database connection do not have a title, e.g. "'XP2HAD02 (P - Big2: DDA, DMK, DNL)' Authentication" any longer.
This means that the windows can no longer be identified with KeePass and therefore not filled out automatically.
DBeaver Version
Community Edition 23.3.4
Operating System
Windows 10
Database and driver
No response
Steps to reproduce
No response
Additional context
No response

Thank you for bug report. It's a duplicate of #22766
The issue has been already solved. You could try Early Access version (https://dbeaver.io/files/ea/) or wait for the next release on Monday.


Broken link above to: https://github.com/Microsoft/xlang/blob/master/src/package/nuget/readme.md

In the paragraph entitled "Changes to the Microsoft.Windows.CppWinRT NuGet package for version 2.0" at the top of the page above, a link to the C++/WinRT Nuget Package Readme.md is broken.
It seems like it should reference: https://github.com/Microsoft/xlang/blob/master/src/package/cppwinrt/nuget/readme.md.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 2a8b1601-1a72-aa1c-9ba2-15c2e54e99b7
Version Independent ID: ba32307e-0e03-4372-ab62-6fc2e57155b2
Content: What's new in C++/WinRT - Windows UWP applications
Content Source: windows-apps-src/cpp-and-winrt-apis/news.md
Product: uwp
Technology: platform
GitHub Login: @stevewhims
Microsoft Alias: stwhi

@Oneibus, thanks for pointing this out. I've fixed the link now. ~Steve
(PS I'll go ahead and close the issue. Thanks again!)


Cannot install on HA 2023.10.5

On installing, the following message appears:

Error
This integration does not support configuration via the UI. If you followed this link from the Home Assistant website, make sure you run the latest version of Home Assistant.

There doesn't appear to be any further info in the logs accessible from the UI.

That is odd. How did you install the component? Via HACS?

I too am having this issue.  From the main repository page, when I click the 'Add Integration' link:

It ends up with this error:

Running 2023.12.4 on Home Assistant Green.
I can't find the 'custom_components' folder - there doesn't seem to be an existing folder with that name.
Thanks

Ok - I think I've figured it out.  I was missing HACS; Once HACS was installed/configured, the 'Add Integration' button worked as expected.


Adding another!

We talking Rottweilers or Chihuahuas? Should do fine against cats.

Should do fine against cats.


RuntimeError: (0) == (cuModuleLoadDataEx(&hMod, image.c_str(), sizeof(options) / sizeof(*options), options, values)) INTERNAL ASSERT FAILED

Hi,
I installed tutel via  python3 -m pip install --user --upgrade git+https://github.com/microsoft/tutel@main
I am running a test script
import torch
from tutel.jit_kernels.gating import fast_cumsum_sub_one

matrix = torch.randint(0, 100, (10000, 100), device='cuda')
cumsum_tutel = fast_cumsum_sub_one(matrix, dim=0) + 1

and facing error
[W custom_kernel.cpp:149] nvrtc: error: invalid value for --gpu-architecture (-arch)
 Failed to use NVRTC for JIT compilation in this Pytorch version, try another approach using CUDA compiler.. (To always disable NVRTC, please: export USE_NVRTC=0)
Traceback (most recent call last):
  File "test.py", line 6, in <module>
    cumsum_tutel = fast_cumsum_sub_one(matrix, dim=0) + 1
  File "/home/jdhwang/.local/lib/python3.8/site-packages/tutel/jit_kernels/gating.py", line 22, in fast_cumsum_sub_one
    return torch.ops.tutel_ops.cumsum(data)
  File "/home/jdhwang/conda/envs/cl/lib/python3.8/site-packages/torch/_ops.py", line 502, in __call__
    return self._op(*args, **kwargs or {})
RuntimeError: (0) == (cuModuleLoadDataEx(&hMod, image.c_str(), sizeof(options) / sizeof(*options), options, values)) INTERNAL ASSERT FAILED at "/tmp/pip-req-build-c9h2prbs/tutel/custom/custom_kernel.cpp":205, please report a bug to PyTorch. CHECK_EQ fails.

following https://github.com/microsoft/tutel/issues/203, I exported export USE_NVRTC=1 and I am using RTX4090 with torch ('2.0.0+cu117') and Cuda 11.7 (nvcc as well).

Does anyone of export USE_NVRTC=1 & export USE_NVRTC=0 work? Seems like it is environmental problem (e.g. Multi CUDA version / ..), and it isn't likely to happen if CUDA + Pytorch are in a clean docker container.

Hi @ghostplant, Thank you for your fast response. If I set export USE_NVRTC=0, it says
nvcc fatal   : Unsupported gpu architecture 'compute_89'
Traceback (most recent call last):
  File "test.py", line 6, in <module>
    cumsum_tutel = fast_cumsum_sub_one(matrix, dim=0) + 1
  File "/home/jdhwang/.local/lib/python3.8/site-packages/tutel/jit_kernels/gating.py", line 22, in fast_cumsum_sub_one
    return torch.ops.tutel_ops.cumsum(data)
  File "/home/jdhwang/conda/envs/cl/lib/python3.8/site-packages/torch/_ops.py", line 502, in __call__
    return self._op(*args, **kwargs or {})
RuntimeError: (true) == (fp != nullptr) INTERNAL ASSERT FAILED at "/tmp/pip-req-build-c9h2prbs/tutel/custom/custom_kernel.cpp":49, please report a bug to PyTorch. CHECK_EQ fails.

I will try to test on clean env and try with cuda11.8 as well.

It works after upgrading torch (`2.0.1+cu11.8), nvcc and nccl. Thank you!


Add Basic In Memory Auth

We only need enough in place here to start building role based behavior in the app.

The roles are: Admin, Manager, User ?

I think those are fine until we find out that we need others.

Does this story include anything for the Grails side?
I've added some users to the angular side.  Feel free to login as user:user, manager:manager, or admin:admin.  Nothing spectacular happens yet, but I do have the 'report' state limited to accounts with the 'user' role.
@craigburke I extended the data field in the state config object to show what roles a state expects users to have to allow a transition to the next state.  What do you think of this approach?  It feels clean to me.  I'm also curious about what I need to do to make use of the annotate and closure-wrap modules in the asset pipeline.
Let me know what you think.

@VoltiSubito I really like what you did with the roles. Alternatively we could add an $http interceptor to redirect to $state('login') when we get a 403 response: https://docs.angularjs.org/api/ng/service/$http
I think I like your approach better though. It has the advantage of not requiring each state to have an http request to trigger the 403 and not triggering any requests at all before you are authenticated. We'll have some redundancy on the backend but I think it's really slick :+1:
As for the asset pipeline stuff. I actually put a couple pull requests in to the asset pipeline core project to help with those two modules. The closure wrap will automatically wrap any js file with the directive option:
//= wrapped

As for the annotation we'll actually have a decision to make on that front. Basically it'll boil down to using my annotate plugin (which will just work out of the box) or getting much better build performance using the soon to be available angularPass compile setting in new version of AP. It's faster but we'll have to put a special comment before each function like this:
// @ngInject
function FooController($scope) {
...
}

So we'll just have to see which approach makes most sense.

We have a dummied up in memory thing now so I am going to go ahead and close this.  We need to start building real auth but will track that as separate issues.


Check if XAPI can be use in place of overpass

Most Overpass queries are simple, is this case XAPI can be fastest on pure XAPI server (not overpass server masquerade as XAPI).

@vinber and I speaked to Yohan Boniface yesterday and we all agree that a cache system is required in MapContrib.
So I think that kind of development is useless. Do you agree? @vinber?

I don't know difference between xapi and overpass, request are very different ?

Voila par exemple:
https://open.mapquestapi.com/xapi/
http://open.mapquestapi.com/xapi/api/0.6/node[amenity=pub][bbox=-77.041579,38.885851,-77.007247,38.900881]?key=Kmjtd|luua2qu7n9,7a=o5-lzbgq
http://osm.dumoulin63.net/xapiviewer/
Request are more simpler, but in the other side servers are fattest.

Did you notice that mapquest xapi data seems to be least 6 months old - according to the xapi:planetDateinformation, which is returned for some of the queries?
<osm version="0.6" generator="Osmosis SNAPSHOT-r26564" xapi:planetDate="2015-12-08T13:54:02Z">

Link

I had no clue no. What do you say @frodrigo?

Do not base on MapQuest server (changing the open political).
But there is others xapi server.

MapQuest's xapi server is officially down now: http://devblog.mapquest.com/2016/10/06/xapi-api-service-to-be-decommissioned-on-october-31-2016/


A new session is created every time you land on step1 page

See details here: https://github.com/stanfordnmbl/opencap-api-private/issues/97

Last Tuesday we discussed that it could be good if we solve this at session creation time.
When we create a session, we check if the last session was used.

If it was used, we don't touch it and create a new session.
if it was not used (e.g., there are no trials, not even calibration trial), we have two options:

Reuse it.
Remove it and create a new session (possibly simpler with the current implementation).

solved by https://github.com/stanfordnmbl/opencap-api/issues/82