Assigning GPS locations to EM-APEX ctd and vel data based on interpolation

@ElizabethP712 I'm making progress on this. I have the technique figured out with toy data. Now I need to test it with the actual data. I'll post it here by mid-late afternoon once I've tested it.

Here you go: squid-vel-interpolate-gps.ipynb

Thank you! I haven't had a chance to apply this yet, but once it works I will resolve this issue.

Hey Emilio!
It is probably a good thing you had me run through this notebook today, as I ran into an error with the interpolation step and slinear method. Please see the new file I just uploaded titled Errorsquid-vel-interpolate-gps.ipynb.

That's very strange! I'll try to take a look later tonight.

I reran the notebook, and it again worked fine. But then I realized that I didn't use the AOS conda environment; I think I was in a hurry and didn't want to install pyarrow on that environment, so I used a different one. So, it's possible there are some subtle differences in a dependency.
At this point in time, it's more important for you to have access to the merged-interpolated EM-APEX data than to be able to run my notebook. So, I've uploaded the merged file to the Google Drive folder where the other EM-APEX data files are. It's called vel_gps_interpolated.parquet, and it's only about 17 MB.

Okay, I think today and tomorrow I will focus on the velocity dataset you uploaded to do some last minute comparisons. My poster is mostly done by now I just have these velocity comparisons to do, I have a few things I am going to add (text wise) for some of my other graphs, and I want to decide on what the highlight of my project is, but other than that I should have a copy of the poster (and text, as it will be easier to read that way) uploaded to a new issue for you to review tomorrow, especially considering I will not be able to work on the poster again until after 4:30pm.


Hotkey to change capitalization of words

Description of the new feature / enhancement
I find this shortcut very helpful anywhere in windows.
Highlighting any text, and then pressing a HotKey will cycle through the 4 most common text casings, converting the highlighted text right in-line.
Scenario when this would be used?
IF YOU BY MISTAKE TYPED IN CAPS LOCK. Or want t rename a file from all lowercase, to first letter capital.
Supporting information
https://geekdrop.com/content/super-handy-autohotkey-ahk-script-to-change-the-case-of-text-in-line-or-wrap-text-in-quotes

Sorry I think this is duplicate of #20225
My bad.


Allow to use other connection and entity manager than "default"

Subject
Allow to use other connection and entity manager than "default".

I am targeting this branch, because these changes respect BC.

Closes #140.
Changelog

### Added
- `connection` configuration node in order to use a different connection than "default";
- `entity_manager` configuration node in order to use a different entity manager than "default".

Thanks @phansys


Remove old abort checker

Regarding this piece of code:
// client-abort.js
'use strict';

const http = require('http')
const port = 5555

const server = http.createServer((req, res) => {
  req.on('aborted', () => console.log(`Server: req aborted by client (req.aborted: ${req.aborted})`))
  setTimeout(() => res.end('chunk of data'), 100)
});

server.listen(port);

server.on('listening', () => {
  const req = http.get({ port });

  req.on('error', err => {
    console.error('Client: error', err)
    server.close()
  })

  setTimeout(() => req.abort(), 50)
})

$ node client-abort.js
Server: req aborted by client (req.aborted: true)
Client: error { Error: socket hang up
    at createHangUpError (_http_client.js:323:15)
    at Socket.socketCloseListener (_http_client.js:364:25)
    at Socket.emit (events.js:203:15)
    at TCP._handle.close (net.js:606:12) code: 'ECONNRESET' }

Instead, use a Node-ish mechanism to achieve the same goal

I understand your point, it makes sense for people that are not familiar with express/node ecosystem. I tend to define meaningful names to avoid large explanations in comments. I'm not a big fan of comments but for documentation. I'd like to use JSDoc or similar, however I didn't find the time to give it a try.


arrayFilters + findAndModify support

Hello, is there a way how to use arrayFilters for findAndModify, that was introduced in MongoDb v. 3.6?
If not directly, can I somehow write and execute native query, such as I gues mongoose can?
Thanks very much for any reply.

You can always use any native stuff, by getting reference to native driver. The only problem is to know when mongoskin driver becomes native, because at first it returns proxy object, and only after connection established it has native driver.
The rough code could be like this:
function onOpened(callback){
            if(db.isOpen())
                callback();
            else{
                db._emitter.once('open', function (err, db) {
                    callback();
                });
            }
        };

and you can use it like this
//we get mongoskin db object
db = mongo.db(dbName, dbOptions);
console.log(db._native); //native driver is not there yet
onOpened(function(){
    //now we can run anything we want on native driver directly, just as in MongoDB documentation
    console.log(db._native);
});

You can always use any native stuff, by getting reference to native driver.

I didn't know that.
Many thanks for lifecycle explanation and clear example.


discord invite link expired

Hi, I am trying to follow the invite link on https://sfzformat.com/ to join the discord but it's expired.

Discord was having general login issues at that time so that might have caused it. Can you try again? If it still doesn't work then the easiest thing for us to do might be to just generate a new invite link and update the page, but hopefully it'll work now.

I can't send anyone any messages on discord at all anymore; it says "API Outage"

Seems like the general Discord issue, then, not specific to our server. I can now get into Discord, but it seems they're still not up to 100% user capacity. I got no better ideas than "try again in a few hours or tomorrow, it should work then".

Ok, I'll try again soon.  Discord had told me that specific link had
expired.  If that's not true and it's a general discord problem instead
then it shouldn't be saying that about links.
On Wed, Jan 26, 2022, 4:21 PM D. Smolken @.***> wrote:

Seems like the general Discord issue, then, not specific to our server. I
can now get into Discord, but it seems they're still not up to 100% user
capacity. I got no better ideas than "try again in a few hours or tomorrow,
it should work then".
—
Reply to this email directly, view it on GitHub
https://github.com/sfzformat/sfzformat.github.io/issues/79#issuecomment-1022614073,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADFDUGTKZBFQRPVEC72MWFTUYBQWLANCNFSM5M37NYXQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you authored the thread.Message ID:
@.***>

I'm in the discord now.


Renamed tests environement json file

Pull Request Test Coverage Report for Build 820

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

Totals

Change from base Build 818:
0.0%

Covered Lines:
7899

Relevant Lines:
7899

💛  - Coveralls


Elastic APM Java agent cannot automatically infer the class name / object name for a span when using Scala and @CaptureSpan

Describe the bug

According to the documentation @CaptureSpan will automatically set the name of the span to Classname#methodname. When using Scala 2, this works fine for classes but not for objects. For objects, only the #methodname is inferred but the Classname is just missing.
Steps to reproduce

Use Scala 2.12.18 and co.elastic.apm:apm-agent-api:1.50.0.
Create a Scala class and object:

import co.elastic.apm.api.{CaptureSpan, ElasticApm, Transaction}

class Example {
 @CaptureSpan
 def myClassMethod() = println("Example#myClassMethod")
}

object Example {
 @CaptureSpan
 def myObjectMethod() = println("Example#myObjectMethod")
}

ElasticApm.startTransaction()

(new Example).myClassMethod()

Example.myObjectMethod()

ElasticApm.stopTransaction()

Run the code.
Check your Elastic APM instance for the captured spans.

Expected behavior

Two spans are captured with the names:

Example#myClassMethod
Example#myObjectMethod

Debug logs
n/a

Hi, thanks for reporting this. Unfortunately we're short of Scala experience at this time, so we're unlikely to priortize working on this soon.

I haven't used Scala, but here is what I think happens:
This article explains in the chapter "Function as Value" what is being generated by the Scala compiler:

an Example class as a wrapper
an Example$ class for the object
an Example$anonfun$1 for the method within

If I am not mistaken, the issue is with the code in SimpleMethodSignatureOffsetMappingFactory:
final String className = instrumentedMethod.getDeclaringType().getTypeName();
String simpleClassName = className.substring(className.lastIndexOf('$') + 1);

This code was made for nested classes where the text after the dollar sign denotes the class name of the nested class. In the case of scala, this string is empty, therefore the class name in APM is empty.
Maybe it would be possible to check the class name for an empty string and use the parent class name in this case?

@jackshirazi I added a draft PR - maybe you could check sometime if this is the correct direction?


ConfirmHandler receives wrong Message when Confirm() with implicit StrSubstNo() is used.

Hello all!
I am working on automated tests for one of our new apps and I have issues with ConfirmHandlers not receiving the whole message text when using Confirm() with Values for implicit StrSubstNo().
For example, when my Confirm looks like this:

where labels are:

ConfirmHandler receives Message with only ConfirmChangeQst text, without having %1 replaced with BillToPartnerTxt:

When I change Confirm to include explicit StrSubstNo:

ConfirmHandler receives correct Message:

I guess this is a bug?
I am working on version 22.1.
BR, Matjaž

Hey @lvanvugt !
Yeah, I've encountered this issue before, but I could usually avoid it by checking just the beginning of the confirm message. This time, it was impossible and I really did not feel like changing the code to enable automated tests...
I'm just realizing that I might have picked a wrong place to report this bug - Yammer is probably a better place for platform bugs.

@nikolakukrika has created an internal bug now.


jiti throws SyntaxError

@webpro In general it looks like knip doesn't like await import statements. Running a debug build in my repo reports this error:
  const dfnskeys = Object.keys(await Promise.resolve().then(() => require('date-fns/locale')));
                               ^^^^^

  SyntaxError: missing ) after argument list

To reproduce

Go to my repo > Code (top right) > Create codespace on main
Run ``cd frontend```
Install knip and add it to the script section as per the readme
Run it using npm run knip. Add the -d flag to output the debug message

Please let me know if you want this in another issue.
Originally posted by @ferferga in https://github.com/webpro/knip/issues/317#issuecomment-1797970210

Related to (or potentially a duplicate of) #290.

Workaround: rename vite.config.ts to vite.config.js

Knip v5.1 introduces a new workaround: bunx --bun knip

Closing this as there duplicates, and known issues are documented at knip.dev.


Support for ApiGatewayV2 resources

We are missing descriptions for api gateway v2 and we need to add support for them.

Solved by #111


action.keyDown(Keys.CONTROL) is not working with IE11

Action class operation keyDown(Keys.CONTROL) is not working with IE11.
I have a scenario in our Test Case, Where I need to select the multiple rows in our UI Grid. So I am trying to do this by using Selenium Action Class. Code is below -
List empolyeeList = new ArrayList;
for (String employeeName : employeeNames) {
empolyeeList.add(driver.findElement(By.xpath("Xpath of employeename")))
}
Actions action = new Actions(driver);
action.keyDown(Keys.CONTROL);
for (String employee : empolyeeList ) {
employee.click();
}
action.keyUp(Keys.CONTROL).build().perform();
Above code is working fine with chrome and firefox but it's not selecting multiple elements on IE11.
Although it starts work if I add the IE driver capability "requireWindowFocus" true. But it will break if browser is minimized or OS is locked.

Browser(s): IE11
Operating System and Version : Window 7
Selenium : 2.53

Could you create a small example repository that reproduces this issue? That will help narrow down the problem and also provide context for any external issues we may need to file.

Is there any update on this one? I am facing a similar issue. I have a page where I have to fill some fields  then click the next button. Now the next button is not in the view. So I am doing something like
let UiTestTimeOut = 60000
let nextButton = element(by.id('next-button'));
browser.actions().mouseMove(nextButton ).perform();
browser.wait(EC.visibilityOf(nextButton ), UiTestTimeOut);
nextButton.click();
but the action class seems to be not working and the test fails ( I can see that browser doesn't scroll)
with TimeoutError: Wait timed out after 60428ms
Using
Protractor 5.1.2

@anshulc55 ,
Is there any update on this issue?
@10kresources ,
Did you also found a solution for you problem?
If there is no activity within the coming week I'll close the issue. If you experience that there is still an issue please create a new issue and fill the issue template and provide an example project.
Grtz
wswebcreation


Move qier222.yesplaymusic 0.4.1 to qier222.YesPlayMusic 0.4.1

Microsoft Reviewers: Open in CodeFlow

From Trenly in chat:

Because the old folders were still present, when you attempted to move them changing only the casing, the filesystem appears to have ignored the casing change

[Policy] Reset Labels


Unable to load wiki_auto_asset_turk from GEM

Describe the bug
I am unable to load the wiki_auto_asset_turk dataset. I get a fatal error while trying to access wiki_auto_asset_turk and load it with datasets.load_dataset. The error (TypeError: expected str, bytes or os.PathLike object, not NoneType) is from filenames_for_dataset_split in a os.path.join call

import datasets
print (datasets.version)
dataset = datasets.load_dataset("GEM/wiki_auto_asset_turk")

System output:
Generating train split: 100%|█| 483801/483801 [00:03<00:00, 127164.26 examples/s
Generating validation split: 100%|█| 20000/20000 [00:00<00:00, 116052.94 example
Generating test_asset split: 100%|██| 359/359 [00:00<00:00, 76155.93 examples/s]
Generating test_turk split: 100%|███| 359/359 [00:00<00:00, 87691.76 examples/s]
Traceback (most recent call last):
File "/Users/abhinav.sethy/Code/openai_evals/evals/evals/grammarly_tasks/gem_sari.py", line 3, in
dataset = datasets.load_dataset("GEM/wiki_auto_asset_turk")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/datasets/load.py", line 2582, in load_dataset
builder_instance.download_and_prepare(
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/datasets/builder.py", line 1005, in download_and_prepare
self._download_and_prepare(
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/datasets/builder.py", line 1767, in _download_and_prepare
super()._download_and_prepare(
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/datasets/builder.py", line 1100, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/datasets/builder.py", line 1565, in _prepare_split
split_info = self.info.splits[split_generator.name]
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/datasets/splits.py", line 532, in getitem
instructions = make_file_instructions(
^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/datasets/arrow_reader.py", line 121, in make_file_instructions
info.name: filenames_for_dataset_split(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/datasets/naming.py", line 72, in filenames_for_dataset_split
prefix = os.path.join(path, prefix)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 76, in join
TypeError: expected str, bytes or os.PathLike object, not NoneType
Steps to reproduce the bug
import datasets
print (datasets.version)
dataset = datasets.load_dataset("GEM/wiki_auto_asset_turk")
Expected behavior
Should be able to load the dataset without any issues
Environment info
datasets version 2.18.0 (was able to reproduce bug with older versions 2.16 and 2.14 also)
Python 3.12.0

Hi! I've opened a PR with a fix. While waiting for it to be merged, you can load the dataset from the PR branch with datasets.load_dataset("GEM/wiki_auto_asset_turk", revision="refs/pr/5")

Thanks Mario. Still getting the same issue though with the suggested fix
#cat gem_sari.py
import datasets
print (datasets.version)
dataset =datasets.load_dataset("GEM/wiki_auto_asset_turk", revision="refs/pr/5")
End up with
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/datasets/load.py", line 2582, in load_dataset
builder_instance.download_and_prepare(
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/datasets/builder.py", line 1005, in download_and_prepare
self._download_and_prepare(
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/datasets/builder.py", line 1767, in _download_and_prepare
super()._download_and_prepare(
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/datasets/builder.py", line 1100, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/datasets/builder.py", line 1565, in _prepare_split
split_info = self.info.splits[split_generator.name]
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/datasets/splits.py", line 532, in getitem
instructions = make_file_instructions(
^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/datasets/arrow_reader.py", line 121, in make_file_instructions
info.name: filenames_for_dataset_split(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/datasets/naming.py", line 72, in filenames_for_dataset_split
prefix = os.path.join(path, prefix)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 76, in join
TypeError: expected str, bytes or os.PathLike object, not NoneType

Hmm, that's weird. Maybe try deleting the cache with !rm -rf ~/.cache/huggingface/datasets and then re-download.

Tried that a couple of time. It does download the data fresh but end up with same error. Is there a way to see if its using the right version ?

You can check the version with python -c "import datasets; print(datasets.__version__)"

the datasets version is 2.18.
I wanted to see if the command datasets.load_dataset("GEM/wiki_auto_asset_turk", revision="refs/pr/5") is using the right revision (refs/pr/5).

Still have this problem

The issue is fixed once the fixing PR has been merged and the dataset has been converted to Parquet.
If the problem persists on your side, you should update your datasets library:
pip install -U datasets

And if you have already the latest version of datasets, then you need to delete the old version of this dataset in your cache:
rm -fr ~/.cache/huggingface/datasets/GEM___wiki_auto_asset_turk
rm -fr ~/.cache/huggingface/modules/datasets_modules/datasets/GEM--wiki_auto_asset_turk


MSSQL: Support for specifying client certificate with sslmode

The parameters sslkey and sslcert specify the client's TLS key pair for use in the TLS connection between Secretless and the target service
Acceptance Criteria

[ ] Support exists for specifying a client's TLS key pair
[ ] Unit/Integration tests for specifying client's TLS key pair

@doodlesbykumbi can you look into whether MSSQL actually uses this and note what you find on this ticket?

@doodlesbykumbi found the following:
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/076e0764-576f-40a9-9bfc-b622e4ac8e22/sql-2014-certificate-authentication?forum=sqlsecurity

SQL Server does not support mutual authentication via TLS. In other words, there is no certificate based client authentication available in SQL Server.

As such, we will not be adding this functionality to the MSSQL connector at this time.


fix cuda

Change Description
Describe your changes
cuda was broken, expecting int vs. "cuda"
Issue reference
This PR fixes issue #XX
Checklist

[ ] I have reviewed the contribution guidelines
[ ] My code includes unit tests
[ ] All unit tests and lint checks pass locally
[ ] My PR contains documentation updates / additions if required

Hey @keeganmccallum , thanks for submitting the PR. Interesting bug, I checked on MacOS with MPS device it worked but probably not on cuda. I think the logger also needs to be changed to fix the test

This isn't fully fixed as the logger fails looking for {device}.  furthermore the are other scanners like toxicity, ban topics, and code that require the same change.
I opted to change the scanners differently by:
'''python
from llm_guard.util import device_int
device=device_int  # to satisfy logger code
'''

Thanks for sharing the problem. I just committed the code that should address it. Interestingly, I didn't spot it when testing.


MLFlowLogger used with server crashes training

🐛 Bug
Exceptions in MLFlowLogger are not caught, these produce the break of the training and loss of the model. This happens most often when using a server to log data. Since the MLFlowLogger uses MLFlow, and MLFlow has an option to log data over a server, exceptions can happen for various reasons concerning the third party server components.
To Reproduce
In order to reproduce the bug most effectively, you must run a mlflow server with some database. I used MySQL database and the server uses the local HTTP protocol.
Prepare the MySQL database and run the server

Install MySQL in your system.

sudo apt install mysql-server

Create a database to use as an MLflow backend tracking server.

CREATE DATABASE mlflow_tracking;

Under Linux mlflow server can be run with the following command:
user@pc:~/ModelFolder$ mlflow server --backend-store-uri mysql+pymysql://root@localhost/mlflow_tracking --default-artifact-root file:/home/user/ModelFolder/mlruns  -h <IP_ADDRESS> -p 5000

Info:

ModelFolder is the place of the training script
mlflow_tracking is the MySQL database (it can be empty, mlflow will create the needed structure)
ModelFolder/mlruns is the default dir where mlflow stores data

In order to run locally the server, you need to disable passwords for the MySQL user root@localhost.
You can use the following gist link to the training script (it is based on the default  bug_report_model.ipynb):
bug_report_model_mlflowlogger_server.ipynb
Expected behavior
Whenever the server is not working the training crashes.
Proposed solution
I've proposed a solution to the given problem by catching exceptions. I've tested three scenarios with the server:

Server is turned off, and the script is started.
Server is on, the script is started, and the server is killed during the training.
Server is on, the script is started, and the server is killed after the first training finishes but before it writes to the database. For this, I used a sleep timer of 60 sec. in the script.

I've investigated these three scenarios since the exception is caught in different functions so a solution to only one scenario is not sufficient.
Additional context
Similar issues were raised previously:

https://github.com/PyTorchLightning/pytorch-lightning/issues/6641
https://github.com/PyTorchLightning/pytorch-lightning/issues/9607

NOTE: PR with the proposed solution will follow quickly.
cc @borda

@GinkoBalboa Hello, thanks for reporting.
I am not convinced about the solution you propose. It essentially ignores all exceptions and redirects them to standard output. This is not normally how we handle exceptions.

exceptions can happen for various reasons concerning the third party server components.

Whenever the server is not working the training crashes.

It would be good to know what exception is being raised here and catch this one specifically. Also, it would be good to know if there is any recommendations from MLflow directly how these connection issues should get handled (outside PL). Is this something people run into frequently and wrap their whole code into try-except all exceptions? I doubt that. Finally, I think it would be the best if MLflow supported ways of configuring this directly in the client, for example via an option to warn instead of error.

The problem that I have is that the PL doesn't handle exceptions, while internally uses 3rd party code that throws exceptions. In my humble opinion, the exceptions mechanism is generally conceived to alarm about some malfunction without breaking the whole application if possible. I think here, PL, and MLFlow of any other applications shouldn't stand in the way of model training. If the server doesn't work, this shouldn't be a reason to break training (which can take hours and even days). I agree with you, this is not a good fix, it is not a fix at all - but this dirty patch/override makes a difference for me in the sense to use or don't use PL. I just wanted to point that out and help the maintainers improve their code.

@awaelchli thoughts on @GinkoBalboa's thoughts?  Is there a better way to address the issue that @GinkoBalboa is running into?  Like he suggests, it would be great to not fail long training runs on something like this.

Hi
Thanks for the replies. I agree there is a user need and I definitely think that connection errors or server-side errors should not cancel the long running model training run. The only thing I'm saying is that I am not sure this should be implemented in user code / PyTorch Lightning but rather directly be configureable by the MLFlowClient directly, as your request applies to any MLFlow user not just Lightning users. Does this make sense?
I would prefer if we opened a second issue on the MLflow GitHub to get the opinions of the MLFlow devs as well :)

Hi Thanks for the replies. I agree there is a user need and I definitely think that connection errors or server-side errors should not cancel the long running model training run. The only thing I'm saying is that I am not sure this should be implemented in user code / PyTorch Lightning but rather directly be configureable by the MLFlowClient directly, as your request applies to any MLFlow user not just Lightning users. Does this make sense? I would prefer if we opened a second issue on the MLflow GitHub to get the opinions of the MLFlow devs as well :)

MLFlow sends exceptions. It is Lightning that does nothing about them. So in the manner of progressing exceptions I think MLFlow allready does what it needs to be done. They end up in Lightning which doesn't deal with them but breaks the run. That is why I've made the most simple patch (just catch exceptions) in order to point out a missing functionality in Lightning.

This is by far our biggest issue with training in lightning.  Our MLFlow server is remote and whenever there is a communication issue with MLFlow it takes down the training jobs.  Having an option to continue training and ignore any issues with logging would greatly improve my life!  The proposed PR while sub-optimal would fix my problem.  I think having an option to ignore exceptions in the logger is reasonable.


Tensor slicing

The scenario is that you have a Tensor and want to provide a slice of it as another Tensor.
The slice could take a number of forms:

n-d Tensor, slice to n-1-d where value for reduced dimension is passed in.  EG: give a tensor for row 5.
Slice a range of an n-d Tensor to an n-d Tensor.  Similar to above but over a range.

It's possible to have more than one sliced dimension and also possible to slice dimensions in the middle (not just first/last dimension).
Slicing should be possible merely by manipulating the dimensions and strides independently using the same backing memory.   In this way a slice is a view of the backing storage.  Calling To*Tensor on a sliced tensor would copy it and compact the sliced data.

Here's a real example of the second scenario.
Given a 2-dimensional image represented as a tensor, suppose we wish to crop to a portion defined by rectangle ((100, 600), (200, 800)).  This is really two slicing operations where we slice the first dimension from (100, 600) and the second dimension from (200, 800).

Here's an experiment as a step towards this
https://github.com/ericstj/corefxlab/commit/870d7b8a22b432d362b783f501d510ce98ceffaf

Completed with https://github.com/dotnet/corefxlab/pull/1927


Snippets raster functions

Useful resource to view snippets of the raster functions that can be applied in the ArcGIS Maps SDK for JavaScript

Awesome @libertadcc ! thanks!


BlameableBehavior updates createdByAttribute on every update

What steps will reproduce the problem?
In model I add behaviors to set actual user on insert:
public function behaviors()
{
	return [
			[
				'class' => BlameableBehavior::className(),
				'createdByAttribute' => 'fk_creator',
				'updatedByAttribute' => false,
				'attributes' => [
					ActiveRecord::EVENT_BEFORE_VALIDATE => ['fk_creator']
				]
			],
                 ];
}

What is the expected result?
Set actual user to fk_creator at insert, not at update.
What do you get instead?
Refresh fk_creator at every update.
Additional info

Q
A

Yii version
2.0.12

PHP version
7.1.12

Operating system
Windows 10

See details from attributes property:

List of attributes that are to be automatically filled with the value specified via $value. The array keys are the ActiveRecord events upon which the attributes are to be updated, and the array values are the corresponding attribute(s) to be updated. You can use a string to represent a single attribute, or an array to represent a list of attributes. For example,
[
    ActiveRecord::EVENT_BEFORE_INSERT => ['attribute1', 'attribute2'],
    ActiveRecord::EVENT_BEFORE_UPDATE => 'attribute2',
]

In your case, you define when before validate, the attribute fk_creator should be updated. When should be something like
'attributes' => [
     ActiveRecord::EVENT_BEFORE_INSERT => ['fk_creator']
]

Quote from api:

By default, BlameableBehavior will fill the created_by and updated_by attributes with the current user ID when the associated AR object is being inserted; it will fill the updated_by attribute with the current user ID when the AR object is being updated.

So, fk_creator should only be filled at insert, not at update.

You are overrind the default behavior from BlameableBehavior when set the attributes. Change to

'attributes' => [
     ActiveRecord::EVENT_BEFORE_INSERT => ['fk_creator']
]

I see. Thanks for helping!


[FLINK-14273][Table]Add accumulator type to actual type list in AggSqlFunction

What is the purpose of the change
Add accumulator type to actual type list in AggSqlFunction according to issue FLINK-14273
Brief change log

Add a method to Prints the first signature of methods with given name in a class and one signature consisting of DataType.
Use the above method to actual type list when ValidationException

Verifying this change
This change is already covered by existing tests, such as UserDefinedFunctionValidationTest.testAggregateFunctionOperandTypeCheck
Does this pull request potentially affect one of the following parts:

Dependencies (does it add or upgrade a dependency): (no)
The public API, i.e., is any changed class annotated with @Public(Evolving): (no)
The serializers: (no)
The runtime per-record code paths (performance sensitive): (no)
Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (no)
The S3 file system connector: (no)

Documentation

Does this pull request introduce a new feature? (no)
If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)

LGTM

Hi @wangxlong , could you add a UserDefinedFunctionValidationTest in blink planner to verify this?

Ignore the message above. I will add the test and merge this PR when travis pass.
Thanks @wangxlong for the contribution!

travis passed: https://travis-ci.org/wuchong/flink/builds/596898870
Merging...


New version: Deezer.Deezer version 6.0.30

Pull request has been created with Komac v1.11.0 :rocket:
Microsoft Reviewers: Open in CodeFlow

@microsoft-github-policy-service agree


New NullInternalLogger implementation of InternalLogger wished for?

To fit the NullObject pattern, NullInternalLogger would be great.  It should extend AbstractInternalLogger for expedience, but otherwise be totally benign in operation.
It is possible to make one dynamically with the Null factory from https://proxytoys.github.io/toys.html, but who wants to slurp one more shaded cglib into your uber-jar solution?

@paul-hammant why not just use SLF4j with noop binding ?

Let me close this now now... Please provide more infos if you are still think its something that should be done


Accept all certificates

I often have to deal with LDAP servers whose certificates are not trusted by my app. So I built an extension method on the configuration that allows to set the VerifyServerCertificate on LdapConnection.SessionOptions to accept all certificates.
Any chance you'd consider mainlining that? You can see the change in my fork

Very useful! I came across the same issue.


ci(tox): fix tox config

:tada: This PR is included in version 1.2.0-rc.1 :tada:
The release is available on:

v1.2.0-rc.1
GitHub release

Your semantic-release bot :package::rocket:


Missing import in t5x/checkpoints.py

Hi! There seems to be a missing import in t5x/checkpoints.py. Inserting the proposed import (based on this) seems to have done the trick, but before that line gets permanently engraved into a PR until the end of time, I'd like to raise this for discussion.
Proposed import
from tensorboard.backend.event_processing import io_wrapper

Culprit code
  for subdir in io_wrapper.GetLogdirSubdirectories(checkpoints_dir):    # this io_wrapper is feeling very lost...
    rpath = os.path.relpath(subdir, checkpoints_dir)
    # Skip runs that do not match user-specified metric.
    if ((not metric_run and
         not _try_fill_metric_run_and_tag_names(metric_name, (rpath,))) or
        metric_run != rpath):
      logging.info('Skipping events in %s', subdir)
      continue

    logging.info('Looking for events in %s', subdir)
    loader = directory_watcher.DirectoryWatcher(
        subdir, event_file_loader.EventFileLoader,
        io_wrapper.IsTensorFlowEventsFile)              #  ... and this one, too :(

I'm having the same issue.


bluespec unstable-2020.02.09 -> unstable-2020.11.04

Continue on with #84142

(thanks @flokli).
a small patch to install the STP stub (upstream PR: https://github.com/B-Lang-org/bsc/pull/278)
set LD_LIBRARY_PATH during build so that bsc finishes bootstrapping
use nixpkgs yices.src instead of a subrepo
match yices gmp-static idiom

I ran this through https://github.com/jcumming/bsc-testsuite, and the 13 failures appear to mostly be nixos-isms.
I'm waiting on to see if upstream takes the patch, so I can drop it from this PR.
Motivation for this change
Update bluespec to latest version.
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[x] other Linux distributions

[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[x] Fits CONTRIBUTING.md.
[x] ran bsc-testsuite

@ofborg build bluespec

@jcumming I've pushed this commit, along with a fix for an incorrect sha256 hash, as part of d402d913d754469f421572284e00292f83de1af5 (with credit to you, of course.) I suspect the hash thing happened because source attributes are fixed-output, so if you download the source once you can screw up the hash later and it'll still succeed, unfortunately.
I've tested this package on my Ryzen machine however and it seems to build just fine. Let's keep submitting any improvements incrementally, either to upstream or here!


Implement Display for lambolt definitions.

Wow, thank you. It is ok to keep it recursive for now.


[ALIASES] Make aliased table names appear in dataset's dashboard

When accessing the datasets dashboard, the dataset names should be aliased if an alias was set for them. Only the alias should show, not the original table name.

Hey @coyle5280, take care of this issue before fixing the rename please!

See PR #154
Changes
Standard User should see alias table name in dashboard view if table has been given an alias.
Dataset or map user should see both an alias name and an original table name in dashboard view


ZPA Resource Name Transforms

Current zscaler-terraformer version
latest
Description
When doing a zscaler-terraform import, a resource name like resource "zpa_policy_access_rule" "resource_audit_allow_72057766911039919" is automatically generated. What would be great is if the transformation from this name to the actual resource name specified in the resource (  name                = "Audit_Allow" for the above example) could be done automatically by reading that line in the resource definition and re-writing the generated name after import. Currently I have to do this manually.
Use cases
This bit of automation would drastically speed process of migrating to IaC.
Potential zscaler-terraformer usage
This should happen automatically during zscaler-terraformer import much like it does in the original Terraformer application when importing cloud resources in bulk.
References
No response

Hi @drank-sinatra The issue has been addressed in the latest release v0.2.0
Thank you

Thank you so much! I will update and try pulling in ZIA tomorrow.


Tomhaile/ch12643/transfer transactions are confusing

CH Task
make sure no Transfer with weird long number of shares occurs in transactions page.
trade with second user then make order using shares and have other user take that trade.

Second User take canned market order
Second User use shares to create order
First User take the new order

verify no transfers like in the screen shot of CH task.

Need to investigate another case not covered by PR.


add gbc registers to io_map but push them behind an if else for if the system is NOT in gbc mode

this was added in 2f75e2c and 636a503 and 2515dfc


Events Page new design

Design

Introduction
So we are having three sections that we need to build, First is the heading, which for now is just an h1 tag, a filter section that will contain logic to change the view below, and lastly the events themselves. Currently, we are fetching data from our airtable instance, though in the future we will replace it with our server, our data fetching layer will still give the same format of data. I would like to talk about how we can tackle this issue, or what I think we should do.
Events Page
In /src/pages/events/index.jsx there is no logic for fetching the data. Actually, we are fetching the data in the individual section namely `/section/events.jsx/, but with the new design we do need to access the data in two different components, and so I think it will be better to fetch the data in top component and pass it to the sub-components. I think all the state-related logic should be in this component.
Filter Section
In this section, we will have the UI for the user to interact with. Basically, this is where the user can choose one of the two options namely upcoming and previous,. So in this component, we do not need to access any data but rather functions to modify the base state. There will be no logic in this component but only render the buttons and take the functions as a prop.
Events Section
In this section, we will just render all the events that we will receive. There will be no logic in this component. It will just receive data and render the list accordingly.
Event Cards
So with the new design, the cards will also be updated.
TODO

[ ] Filter Section
[ ] Events Section
[ ] New design for Event cards. - @kanishkaa24
[ ] Events base Page

[ ] Retrieving data when the page loads.
[ ] Logic to update array of events according to the filter selected.

comment with the task of your choice to get assigned.
Also after you are assigned, create a new issue commenting this issue. as everyone discussing on this issue will get messy.

I want to work with the new design for event cards.

Hey @Souvikns can I work on the code for new design.

@kanishkaa24 go ahead I am assigning you, create a separate issue for your work and start working.

Assign me please.

I have designed these event cards.

I have designed these event cards.

Hey @kanishkaa24 the designing part is done the development phase is started kindly look for the design above.

I have designed these event cards.

Hey @kanishkaa24 the designing part is done the development phase is started kindly look for the design above.

But in todo part, it's mentioned.

@kanishkaa24 it means to develop you got miss understood

I have deleted the unnecessary comments which can create confusion among the contributors.
@kanishkaa24  the design is up on the first comment by @Souvikns ,
It has been made by @SuNiL-Chau .
We are planning to code it using react.

I misunderstood. I'm not looking for development based assignments.

@kanishkaa24 this is a development based assignment. The design has been decided now we need to convert it to a react component.

Ok, so I am gonna take up data loading work as right now it is occurring in the events component where the data is being rendered, but with the new design, we are gonna share that same data in two components, or rather two components will be sharing same data.

Ok, so I am gonna take up data loading work as right now it is occurring in the events component where the data is being rendered, but with the new design, we are gonna share that same data in two components, or rather two components will be sharing same data.


[ERRAI-1092] update demos and errai-bus-jsr356-websocket-weld to Wild…

…fly 11.0.0.Final
jira: https://issues.jboss.org/browse/ERRAI-1092

Can one of the admins verify this PR? Comment with 'ok to test' to start the build.

Can one of the admins verify this PR? Comment with 'ok to test' to start the build.

Build finished. No test results found.


self-report skills approval history

show approval history
when skill was approved and who approved it

PR: https://github.com/NationalSecurityAgency/skills-service/pull/822


Check that ACLs are able to block bridged packets

Test ACLs against traffic which is only bridged by EVE (i.e. not routed) between applications on the same network.
This used to not work correctly in EVE, i.e. bridged traffic was allowed even when it should have been blocked by configured ACLs.
Bug fix for EVE was provided by this PR: https://github.com/lf-edge/eve/pull/2192
Signed-off-by: Milan Lenco<EMAIL_ADDRESS>

@milan-zededa can you please rebased your PR. The version inside defaults is already newer than your one I suppose, please check.

@milan-zededa can you please rebased your PR. The version inside defaults is already newer than your one I suppose, please check.

done


bug: ES Imports

Describe the bug

For some reason, I can't import named exports from pieces. It says it's a CJS module which was working fine like a month or two ago.
To Reproduce

Import any named exports from pieces.
Run it with node from a file.

Expected behavior

Node should throw an error why I needed to do a default import rather than a named import.
Screenshots

Additional context

2021-09-21T08:36:53.651404+00:00 app[worker.1]: file:///app/dist/lib/core/CoreGame.js:1
2021-09-21T08:36:53.651420+00:00 app[worker.1]: import { AliasPiece, AliasStore } from '@sapphire/pieces';
2021-09-21T08:36:53.651420+00:00 app[worker.1]:          ^^^^^^^^^^
2021-09-21T08:36:53.651430+00:00 app[worker.1]: SyntaxError: Named export 'AliasPiece' not found. The requested module '@sapphire/pieces' is a CommonJS module, which may not support all module.exports as named exports.
2021-09-21T08:36:53.651430+00:00 app[worker.1]: CommonJS modules can always be imported via the default export, for example using:
2021-09-21T08:36:53.651431+00:00 app[worker.1]:
2021-09-21T08:36:53.651431+00:00 app[worker.1]: import pkg from '@sapphire/pieces';
2021-09-21T08:36:53.651431+00:00 app[worker.1]: const { AliasPiece, AliasStore } = pkg;
2021-09-21T08:36:53.651431+00:00 app[worker.1]:
2021-09-21T08:36:53.651432+00:00 app[worker.1]:     at ModuleJob._instantiate (node:internal/modules/esm/module_job:124:21)
2021-09-21T08:36:53.651432+00:00 app[worker.1]:     at async ModuleJob.run (node:internal/modules/esm/module_job:179:5)
2021-09-21T08:36:53.651432+00:00 app[worker.1]:     at async Loader.import (node:internal/modules/esm/loader:178:24)
2021-09-21T08:36:53.651432+00:00 app[worker.1]:     at async Object.loadESM (node:internal/process/esm_loader:68:5)
2021-09-21T08:36:53.651433+00:00 app[worker.1]:     at async handleMainPromise (node:internal/modules/run_main:63:12)

Fixed in 44f6b5f0c51d738b11935ff8a4a1df4b361996ff which is published in<EMAIL_ADDRESS>


Switch to native Go ZooKeeper client

WIP for new ZK client library. Not ready for review yet, but I want to see tests pass or fail. Much cleaner for sure.
@enisoc if you're curious.

This change is

@enisoc ready for review now. Much simpler all around I think.

I think you can remove the "zookeeper cgo library config" section in dev.env now.
If there's nothing to be done for the one comment below, then .

Reviewed 42 of 42 files at r1.
Review status: all files reviewed at latest revision, 1 unresolved discussion.

go/zk/zkconn.go, line 152 [r1] (raw file):

			return nil, nil, context.DeadlineExceeded
		case event := <-session:
			if event.State == zookeeper.StateConnected {

The old implementation seems to assume that Dial() might return err == nil and yet later it could indicate failure by sending an event with State != CONNECTED. Is that not the case for the new Connect() as well?

Comments from Reviewable

Review status: 41 of 43 files reviewed at latest revision, 1 unresolved discussion.

go/zk/zkconn.go, line 152 [r1] (raw file):
Previously, enisoc (Anthony Yeh) wrote…
> The old implementation seems to assume that `Dial()` might return `err == nil` and yet later it could indicate failure by sending an event with `State != CONNECTED`. Is that not the case for the new `Connect()` as well?

The problem is we get intermediate events, like one with 'Connecting' state. So we need to ignore these, and just want until the timeout is reached.

Comments from Reviewable

@enisoc PTAL at the next set of commits. I cleaned up a few more env variables. I am also wondering how the MYSQL build ever worked without the CGO_LDFLAGS line I added...

Reviewed 1 of 1 files at r2, 9 of 9 files at r3.
Review status: all files reviewed at latest revision, 2 unresolved discussions.

dev.env, line 92 [r3] (raw file):

    export LD_LIBRARY_PATH=$(prepend_path $LD_LIBRARY_PATH $VT_MYSQL_ROOT/lib)
    export CGO_CFLAGS="$CGO_CFLAGS -I$VT_MYSQL_ROOT/include"
    export CGO_LDFLAGS="$CGO_LDFLAGS -L$VT_MYSQL_ROOT/lib"

So the mysql cgo build broke when you removed the zk cgo configs below?
That's really weird... In fact, the CGO_CFLAGS line above this should also be unnecessary.
We generate the pkg-config file here, according to what mysql_config recommends:
https://github.com/youtube/vitess/blob/master/bootstrap.sh#L181
Then we tell CGO to use those flags with this line:
https://github.com/youtube/vitess/blob/master/go/mysql/mysql.go#L10

go/zk/zkconn.go, line 152 [r1] (raw file):
Previously, alainjobart (Alain Jobart) wrote…
> The problem is we get intermediate events, like one with 'Connecting' state. So we need to ignore these, and just want until the timeout is reached.

Yeah so the trade-off is either we ignore all except `StateConnected` and let any other errors become timeouts, or we come up with a whitelist or blacklist to distinguish good states from bad ones. Since the states are enumerated, it shouldn't be too hard to come up with this list, right? That would help us to fail fast rather than converting all connection errors into timeouts.

Comments from Reviewable

Review status: 49 of 52 files reviewed at latest revision, 2 unresolved discussions.

dev.env, line 92 [r3] (raw file):
Previously, enisoc (Anthony Yeh) wrote…
> So the mysql cgo build broke when you removed the zk cgo configs below?
>
> That's really weird... In fact, the `CGO_CFLAGS` line above this should also be unnecessary.
>
> We generate the `pkg-config` file here, according to what `mysql_config` recommends:
>
> https://github.com/youtube/vitess/blob/master/bootstrap.sh#L181
>
> Then we tell CGO to use those flags with this line:
>
> https://github.com/youtube/vitess/blob/master/go/mysql/mysql.go#L10

I think it might be a weird interaction between dev.env, and prepend_path that has different behavior with the first path it adds vs the next ones (first doesn't have to exist). Trying to get to the bottom of it.

go/zk/zkconn.go, line 152 [r1] (raw file):
Previously, enisoc (Anthony Yeh) wrote…
> Yeah so the trade-off is either we ignore all except `StateConnected` and let any other errors become timeouts, or we come up with a whitelist or blacklist to distinguish good states from bad ones. Since the states are enumerated, it shouldn't be too hard to come up with this list, right? That would help us to fail fast rather than converting all connection errors into timeouts.

Fixing this, I think only the AuthFailed state should be looked at.

Comments from Reviewable

Gonna merge this, and I'll fix forward. I think we verbally agreed this will work.


Deprecate mapserv.utah.gov/enterprisezones

Summary

Application Name: Utah Enterprise Zones
Application Url: http://mapserv.utah.gov/enterprisezones

A short summary of the situation.
Currently, this is a redirect on mapserv that points to this AGOL app: https://utah.maps.arcgis.com/apps/instant/minimalist/index.html?appid=d097ba0c4a3242d6bcbff92f52d82f98
I have vague memories that this used to be a custom app that was so simple that we replaced it with an AGOL map. I recently updated the AGOL app to fix the Chrome map click bug.
@nathankota has spoken with GOED and they said that they don't use it. I don't see any advantages that it has over locate.utah.gov.
I vote that we just get rid of the redirect on mapserv and retire the web app on AGOL. Here's the recent usage:

The other option would be to redirection mapserv to locate.utah.gov but that seems a little much for so little use.
Action items

Assign a person who should complete the task by replacing name with their github @name.
Check [x] the box when the task is completed and add the date of completion.
~Strike~ out all items that do not apply.

[ ] Update relevant gis.utah.gov application pages (name, completed: 2021/00/00)
~- [ ] Remove forklift pallet (name, completed: 2021/00/00)~
~- [ ] Remove application-specific Databases (name, completed: 2021/00/00)~
~- [ ] AGRC Projects team drive folder (name, completed: 2021/00/00)~

Is there a website?
~- [ ] Remove DNS entry (name, completed: 2021/00/00)~
~- [ ] Archive source code repository (name, completed: 2021/00/00)~
Choose one.

[ ] Remove from the web server (name, completed: 2021/00/00)
~- [ ] Replace app with a static page with information (name, completed: 2021/00/00)~
~- [ ] Redirect somewhere else (name, completed: 2021/00/00)~

Is there a map service?
~- [ ] Stop (name, completed: 2021/00/00)~
~- [ ] Delete (name, completed: 2021/00/00)~
Is there a forklift pallet?
~- [ ] Remove repo (name, completed: 2021/00/00)~
~- [ ] Remove stale data from forklift hashing and receiving (name, completed: 2021/00/00)~
~- [ ] Remove row from data/hashed/changedetection.gdb/TableHashes (name, completed: 2021/00/00)~
Are there service dependencies?
It's built on the existing SGID Utah Enterprise Zones hosted feature service so that should stay.

[ ] Deprecate and retire the web map (name, completed: 2021/00/00)

https://utah.maps.arcgis.com/home/item.html?id=967621d926014900ab075692dfc80056

[ ] Deprecate and retire the app (name, completed: 2021/00/00)

https://utah.maps.arcgis.com/home/item.html?id=d097ba0c4a3242d6bcbff92f52d82f98

~- [ ] Validate that the web api does not query it (name, completed: 2021/00/00)~
~- [ ] Validate that AGRC or applications widgets do not reference it (name, completed: 2021/00/00)~
Notification
~- [ ] Twitter (@steveoh)~
Group Task Assignments

Check [x] the box when you have assigned all the tasks relevant to your group.

[ ] Data Team (@gregbunce)
[ ] Dev Team (@steveoh)
[ ] Cadastre Team (@rkelson)

I agree to get rid of this.

/remind me to act on this issue in one week if no one has any issues.

I think that it's official. No one cares. :)
Let's go ahead and kill this app.

a quick grep of the website shows hits in these pages

data/economy/index.html
data/economy/enterprise-zones/index.html
data/sgid-index/index.html

Do we want to remove that as well?

I vote to remove that as well.

I removed the redirect from our webserver and marked the two AGOL items as deprecated.
/remind me to delete the agol items in 30 days

I'm going to assume that @rkelson has looked this issue over and is good with everything. I finished up the last two tasks today.


Update vCenter.yaml

parse: added asterisk at the end to fix parsing

extend: added ClientIP field to fix workbook
Required items, please complete
Change(s):

Added asterisk at the end to fix parsing
Added ClientIP field to fix workbook refering to it

Reason for Change(s):

Failed parsing vCenter.yaml

Version Updated:

No

Testing Completed:

Yes

Checked that the validations are passing and have addressed any issues that are present:

Yes

Hello @schroray, Please accept license agreement
Repackage the solution using V3
https://github.com/Azure/Azure-Sentinel/blob/master/Tools/Create-Azure-Sentinel-Solution/V3/README.md
Update the readme located in Solution folde r

Hello @schroray please accept license agreement

@microsoft-github-policy-service agree


[IOTDB-2844] Implementaion of AggregationOperator and RawDataAggregationOperator

The design doc is in https://y8dp9fjm8f.feishu.cn/docs/doccnuuXYJo0AeM34YhCq61o6Ce#

Coverage increased (+0.2%) to 45.948% when pulling 35d9bd494b82cf3bb45aaa6fb9a15df268e1ef6f on aggregationOp into fa06bbb43243fef53fa07b82dc848cd3684e09b4 on master.


Don't work with Android Data binding

java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.
Getting this error when "SwipeLayout" is added to layout

have you resolved problem ? i got this error , too

tuan4b6k  I can't remember was cause of this issue. But from that I can see I did simplify a bit my UI and moved on click listener on actual views in xml instead of trying set it to  back/surface view using swipe layout. Hope it helps, as DB works with this library


[bug] Handle use-case when there is one or more unknown IDs in a given list

Error encountered
Currently, the submission subcommands that can accept multiple sub IDs (change-status, delete, reset) will stop updating/deleting if an unknown ID is given, e.g.
Scenario 1: unknown sub ID listed first
$ cnb-tools submission change-status 1 9743567 CLOSED
⛔ Cannot find submission or status for id 1. Check the ID and try again.

Scenario 2: unknown ID sandwiched between 2 valid IDs
$ cnb-tools submission change-status 9743567 2 9743568 CLOSED
Updated submission ID 9743567 to status: Status.closed
⛔ Cannot find submission or status for id 2. Check the ID and try again.

Expected behavior
As a user, it would be useful and convenient to continue updating/deleting the IDs that are valid.

Thinking on this more...
We can probably leave the default behavior as: stop running the action if an unknown ID is encountered. But one can optionally choose to skip IDs that unknown and continue on with the action 🤔
Maybe something like this?
$ cnb-tools submission change-status 1 9743567 CLOSED --skip-errors


2 issues with dockerfile

Expected Behavior

Running the following command should complete smoothly:
docker build -t lean.v1 .
after:
git clone https://github.com/QuantConnect/Lean.git
Actual Behavior

Getting this error:
Step 3/5 : COPY ./Launcher/bin/Release /root/Lean/Launcher/bin/Release
COPY failed: stat /d2/docker/tmp/docker-builder116511166/Launcher/bin/Release: no such file or directory
Potential Solution

While compiling the mono project I was getting an error that xbuild should not be used and instead I should use msbuild.
The problem is that msbuild does not produce the following directory:
./Launcher/bin/Release
it makes:
./Launcher/bin/Debug
changing the line in the docker file to:
COPY ./Launcher/bin/Debug /root/Lean/Launcher/bin/Release
solves the problem of building the container.
However, I am not sure if this process is correct.
System Information

Linux wks.net 3.10.0-957.21.3.el7.x86_64 #1 SMP Tue Jun 18 16:35:19 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)
rpm -qa | grep -i mono
mono-data-oracle-<IP_ADDRESS>7-0.xamarin.1.epel7.x86_64
mono-data-<IP_ADDRESS>7-0.xamarin.1.epel7.x86_64
mono-extras-<IP_ADDRESS>7-0.xamarin.1.epel7.x86_64
mono-devel-<IP_ADDRESS>7-0.xamarin.1.epel7.x86_64
gnu-free-mono-fonts-20120503-8.el7.noarch
mono-winfxcore-<IP_ADDRESS>7-0.xamarin.1.epel7.x86_64
mono-llvm-tools-6.0+mono20181128173919-0.xamarin.4.epel7.x86_64
mono-data-sqlite-<IP_ADDRESS>7-0.xamarin.1.epel7.x86_64
culmus-miriam-mono-clm-fonts-0.130-3.el7.noarch
mono-core-<IP_ADDRESS>7-0.xamarin.1.epel7.x86_64
dejavu-sans-mono-fonts-2.33-6.el7.noarch
mono-mvc-<IP_ADDRESS>7-0.xamarin.1.epel7.x86_64
liberation-mono-fonts-1.07.2-16.el7.noarch
mono-web-<IP_ADDRESS>7-0.xamarin.1.epel7.x86_64
mono-winforms-<IP_ADDRESS>7-0.xamarin.1.epel7.x86_64
mono-wcf-<IP_ADDRESS>7-0.xamarin.1.epel7.x86_64
libmono-llvm0-<IP_ADDRESS>7-0.xamarin.1.epel7.x86_64
Checklist

[X ] I have completely filled out this template
[ X] I have confirmed that this issue exists on the current master branch
[ X] I have confirmed that this is not a duplicate issue by searching issues

[ X] I have provided detailed steps to reproduce the issue

This is more of a question about how you use the provided dockerfile, you will need to customize it to your build path and to what executables you want to run.


Geolocation of elements is wrong (British National Grid)

Describe the bug
When the iModel is geolocated via the British National Grid (OSTN15), the coordinates obtained via ECEF transform are incorrect.
To Reproduce
Steps to reproduce the behavior:
import { DefinitionModel, GenericGraphicalModel3d, GeometricElement3d, Graphic3d, IModelHost, SnapshotDb, SpatialCategory } from "@itwin/core-backend";
import { DbResult } from "@itwin/core-bentley";
import { Code, Placement3dProps } from "@itwin/core-common";
import * as fs from "fs";

const OSGB_GPS_2015 = new Uint8Array([120, 94, 99, 16, 184, 193, 202, 192, 192, 196, 128, 2, 28, 150, 133, 68, 56, 6, 222, 146, 22, 57, 98, 31, 225, 136, 42, 69, 29,
    30, 35, 208, 24, 24, 14, 129, 26, 105, 7, 164, 115, 25, 114, 115, 253, 131, 221, 157, 116, 221, 3, 130, 117, 141, 12, 12, 77, 145, 172, 115, 13, 13, 242,
    15, 112, 197, 180, 31, 151, 122, 255, 224, 16, 63, 20, 3, 168, 227, 116, 134, 240, 252, 162, 156, 20, 5, 247, 212, 252, 148, 212, 146, 204, 100, 133, 224,
    202, 226, 146, 212, 92, 133, 252, 52, 5, 67, 75, 11, 19, 34, 236, 192, 171, 95, 71, 193, 221, 213, 87, 193, 208, 192, 25, 183, 65, 16, 127, 41, 56, 21, 101,
    150, 100, 22, 103, 40, 248, 37, 150, 100, 230, 231, 37, 230, 40, 184, 23, 101, 166, 104, 184, 134, 4, 185, 89, 88, 218, 232, 234, 218, 129, 130, 69, 161, 44,
    51, 81, 1, 162, 94, 19, 110, 160, 127, 81, 74, 94, 98, 94, 114, 170, 66, 112, 105, 81, 89, 106, 37, 17, 46, 198, 175, 132, 13, 40, 189, 128, 31, 162, 230, 45,
    48, 82, 153, 25, 196, 27, 41, 54, 148, 8, 3, 76, 114, 136, 80, 52, 224, 74, 228, 14, 128, 157, 240, 192, 195, 1, 226, 20, 62, 135, 213, 171, 128, 64, 203, 31,
    202, 39, 228, 192, 15, 246, 160, 124, 226, 155, 90, 146, 90, 132, 164, 52, 220, 61, 24, 111, 90, 35, 36, 79, 200, 214, 81, 249, 161, 31, 2, 0, 97, 173, 77, 18
]);

const BNG_ORIGIN = { x: 0, y: 0, z: 0 };
const BNG_MAX = { x: 699000, y: 1249000, z: 0 };

class QuickSnapshot {
    db: SnapshotDb;
    dbPath: string;
    space: SpatialCategory;
    graphicsModel: string;

    constructor(dbPath: string) {
        this.dbPath = dbPath;

        if (fs.existsSync(dbPath)) {
            fs.unlinkSync(dbPath);
        }

        this.db = SnapshotDb.createEmpty(dbPath, { rootSubject: { name: "test" } });
        this.setGCS(OSGB_GPS_2015);

        const subject = this.db.elements.getRootSubject().id;

        const definitions = DefinitionModel.insert(this.db, subject, "definitions");
        this.space = SpatialCategory.create(this.db, definitions, "space");
        this.space.insert();

        this.graphicsModel = GenericGraphicalModel3d.insert(this.db, subject, "test");
    }

    save() {
        const dbPath = this.db.pathName;

        this.updateExtents();
        this.db.saveChanges();
        this.db.close();

        this.db = SnapshotDb.openFile(dbPath);
    }

    setGCS(data: Uint8Array) {
        this.db.withSqliteStatement("REPLACE INTO be_Prop(id,SubId,TxnMode,Namespace,Name,Data,RawSize) VALUES(0,0,0,'dgn_Db','DgnGCS',?,1498)", (stmt) => {
            stmt.bindBlob(1, data);
            if (stmt.step() !== DbResult.BE_SQLITE_DONE) {
                throw new Error();
            }
        });
    }

    addPoint(point: { x: number, y: number, z: number }) {
        const placement: Placement3dProps = { origin: point, angles: { yaw: 0, pitch: 0, roll: 0 }, bbox: { low: point, high: point } };

        const element = new Graphic3d({
            category: this.space.id,
            model: this.graphicsModel,
            placement,
            code: Code.createEmpty(),
            classFullName: Graphic3d.classFullName
        }, this.db);

        element.insert();

        return element.id;
    }

    updateExtents() {
        const computed = this.db.computeProjectExtents();
        this.db.updateProjectExtents(computed.extents);
    }

    getElement(id: string) {
        return this.db.elements.getElement<GeometricElement3d>(id);
    }

    spatialToCartographic(elementId: string) {
        const element = this.getElement(elementId);
        const location = this.db.spatialToCartographicFromEcef(element.placement.origin);
        return { latitude: location.latitudeDegrees, longitude: location.longitudeDegrees };
    }

    get center() {
        return this.db.projectExtents.center;
    }

    get cartographicOrigin() {
        const location = this.db.ecefLocation.cartographicOrigin;
        return { latitude: location.latitudeDegrees, longitude: location.longitudeDegrees };
    }
}

class OnlyOrigin extends QuickSnapshot {
    originId: string;

    constructor(dbPath: string) {
        super(dbPath);
        this.originId = this.addPoint(BNG_ORIGIN);
        this.save();
    }
}

class OriginAndMax extends QuickSnapshot {
    originId: string;
    maxId: string;

    constructor(dbPath: string) {
        super(dbPath);
        this.originId = this.addPoint(BNG_ORIGIN);
        this.maxId = this.addPoint(BNG_MAX);
        this.save();
    }
}

(async () => {
    await IModelHost.startup();

    const onlyOrigin = new OnlyOrigin("d:\\tmp\\onlyOrigin.bim");
    const originAndMax = new OriginAndMax("d:\\tmp\\originAndMax.bim");

    {
        console.group("iModel with only BNG origin");

        const originCoordinates = onlyOrigin.spatialToCartographic(onlyOrigin.originId);
        const originPlacement = onlyOrigin.getElement(onlyOrigin.originId).placement.origin;

        console.log(onlyOrigin.center, "Project extents center");
        console.log(originPlacement, "Origin element placement");
        console.log(onlyOrigin.cartographicOrigin, "GCS calculation for project center");
        console.log(originCoordinates, "ECEF Transform calculation for origin element");
        console.log({latitude: 49.766807, longitude: -7.557160}, "British Geological Survey online converter for grid reference <0, 0>");
        console.groupEnd();
    }

    console.log();

    {
        console.group("iModel with BNG origin and max");

        const originCoordinates = originAndMax.spatialToCartographic(originAndMax.originId);
        const originPlacement = originAndMax.getElement(originAndMax.originId).placement.origin;

        const maxCoordinates = originAndMax.spatialToCartographic(originAndMax.maxId);
        const maxPlacement = originAndMax.getElement(originAndMax.maxId).placement.origin;

        console.log(originAndMax.center, "Project extents center");
        console.log(maxPlacement, "Max element placement");
        console.log(originAndMax.cartographicOrigin, "Native GCS calculation for project center");
        console.log(maxCoordinates, "ECEF Transform calculation for max element");
        console.log({latitude: 61.009684, longitude: 3.532475}, "British Geological Survey online converter for grid reference <699000, 1249000>");

        console.log();
        console.log(originPlacement, "Origin element placement");
        console.log(originCoordinates, "(INCORRECT) ECEF Transform calculation for origin element");
        console.log(onlyOrigin.cartographicOrigin, "Correct GCS calculation for origin");
        console.groupEnd();
    }
})();

Output
The above program produces the following output on my box:
iModel with only BNG origin
  Point3d { x: 0, y: 0, z: 0 } Project extents center
  Point3d { x: 0, y: 0, z: 0 } Origin element placement
  { latitude: 49.766806557921356, longitude: -7.557242069457411 } GCS calculation for project center
  { latitude: 49.766806557511465, longitude: -7.557242069457413 } ECEF Transform calculation for origin element
  { latitude: 49.766807, longitude: -7.55716 } British Geological Survey online converter for grid reference <0, 0>

iModel with BNG origin and max
  Point3d { x:<PHONE_NUMBER>000001, y: 1249000, z: 0 } Project extents center
  Point3d { x: 699000, y: 1249000, z: 0 } Max element placement
  { latitude: 61.00972312648966, longitude: 3.5324784903114383 } Native GCS calculation for project center
  { latitude: 61.00972312614054, longitude: 3.532478490311436 } ECEF Transform calculation for max element
  { latitude: 61.009684, longitude: 3.532475 } British Geological Survey online converter for grid reference <699000, 1249000>

  Point3d { x: 0, y: 0, z: 0 } Origin element placement
  { latitude: 49.96821109320045, longitude: -7.4344447784340675 } (INCORRECT) ECEF Transform calculation for origin element
  { latitude: 49.766806557921356, longitude: -7.557242069457411 } Correct GCS calculation for origin

Desktop (please complete the applicable information):

OS: Windows
iTwin.js Version: 4.0.6

The GCRS described by the bunch of bytes is named OSGB-GPS-2015 which is the proper latest version of the British National Grid. However in the code above is called the method spatialToCartographicFromEcef() which should not be used when the iModel property geographicCoordinateSystem is defined. The content of the ecefLocation property contains a linear approximation of the relation between the projected coordinate reference system expressed by the definition of the British National Grid which is based on the Transverse Mercator projection method. Given the nature of the Earth shape and the distortion resulting from flattening the Earth to a Cartesian coordinate system using a projection method, a linear approximation will hold true over a size of 600 meters approximately (in reality it depends on the accuracy required but over 600 meters from the origin where the ecefLocation property was calculated significant vertical errors will occur and after a couple of kilometers horizontal errors will be observed).
For his reason it is recommended that spatialToCartographicFromEcef() not be used when the iModel property geographicCoordinateSystem is defined. If the property is defined then getGeoCoordinatesFromIModelCoordinates() and getIModelCoordinatesFromGeoCoordinates() must be used. If dealing with an iModelConnection frontend then calling cartographicFromSpatialWithGcs() or equivalent will check if the geographicCoordinateSystem is defined and if not, will forward the call to spatialToCartographicFromEcef() if not defined otherwise a GeoConverter will be created that will eventually forward the coordinate conversion to getGeoCoordinatesFromIModelCoordinates().
I did not verify that this is the result for all of the errors observed but it is likely the case.

I see that those APIs will correctly calculate the coordinates. I guess my example was a little misleading.
I observed that the elements in my iModel were incorrectly geolocated (visually) on the frontend (design review and display test app).
From looking at the frontend code that handles map tiles (in BackgroundMapGeometry.dbToCartographic, for example), it seems clear that we are only doing local transforms (regardless of the geographicCoordinateSystem).
Unless I'm misunderstanding how the frontend map tile classes are working, my example code was meant to demonstrate that this won't work (and your explanation definitely seems to confirm that).

@mdastous-bentley would probably know more about how background map are processed. From what I had understood Background Map tiles are displayed using local transforms but the local transforms are supposed to be computed using the proper coordinate conversion process.

It's not clear to me either, it does call the coordinate service to reproject each tile corners into the imodel coordinates but I guess other transforms are used to position each tile.

If I correctly understand the function you linked to, it is converting the lat/long of the map tiles into imodel coordinates.
I didn't see any issue with how the map tiles themselves. They seemed to display correctly.

@swbsi if you've got a problem with elements appearing to be displayed at incorrect positions relative to the map, please provide repro steps for that problem.

@pmconne Will do. I should be able to adapt my example code fairly quickly…

I went back to the original bim that has these display issues, and I'm no longer sure that I am identifying the problem correctly. I will close this issue and reopen a new one once I understand it better.


Isabelle Week 0 Review Ticket

Scrum Team GitHub pages (2 points)

[ ] Web Project: Project Description, Project Plans/Ideas/Wires, Time box
[ ] Team Roles described, Project Owner or Sponsor described, Scrum Board started

Individual GitHub pages (3 points)

[ ] GitHub page for Test Prep study, requiring 5.1, 5.2 notes and actions( See "GitHub pages actions" at the bottom of each TPT page on cspcoders
[ ] GitHub page that documents Data Structures project, using code snippets for key learnings, and links to  GitHub for code and Replit for runtime
[ ] GitHub page that documents intended Create Task project for College Board, snippets, and links to Runtime

Overall Review Score: 4.75/5.
Took off 0.25 points because the Data Structures project was not descriptive enough, and it lacked enough code snippets.


"buf must be a byte string"

Hi, I'm pretty new with python Idk what I'm doing wrong
Traceback (most recent call last):
File "/usr/local/bin/reddit_irc", line 9, in
load_entry_point('reddit-irc==0.1.3', 'console_scripts', 'reddit_irc')()
File "build/bdist.linux-x86_64/egg/reddit_irc.py", line 158, in main
File "build/bdist.linux-x86_64/egg/reddit_irc.py", line 106, in init
File "build/bdist.linux-x86_64/egg/reddit_irc.py", line 117, in load_configuration
File "build/bdist.linux-x86_64/egg/reddit_irc.py", line 133, in parse_server
File "build/bdist.linux-x86_64/egg/reddit_irc.py", line 71, in init
File "/usr/local/lib/python2.7/dist-packages/praw-3.4.0-py2.7.egg/praw/init.py", line 565, in get_content
page_data = self.request_json(url, params=params)
File "", line 2, in request_json
File "/usr/local/lib/python2.7/dist-packages/praw-3.4.0-py2.7.egg/praw/decorators.py", line 116, in raise_api_exceptions
return_value = function(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/praw-3.4.0-py2.7.egg/praw/init.py", line 620, in request_json
retry_on_error=retry_on_error)
File "/usr/local/lib/python2.7/dist-packages/praw-3.4.0-py2.7.egg/praw/init.py", line 451, in _request
response = handle_redirect()
File "/usr/local/lib/python2.7/dist-packages/praw-3.4.0-py2.7.egg/praw/init.py", line 432, in handle_redirect
verify=self.http.validate_certs, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/praw-3.4.0-py2.7.egg/praw/handlers.py", line 146, in wrapped
result = function(cls, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/praw-3.4.0-py2.7.egg/praw/handlers.py", line 56, in wrapped
return function(cls, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/praw-3.4.0-py2.7.egg/praw/handlers.py", line 102, in request
allow_redirects=False, verify=verify)
File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 569, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python2.7/dist-packages/requests/adapters.py", line 362, in send
timeout=timeout
File "/usr/lib/python2.7/dist-packages/urllib3/connectionpool.py", line 516, in urlopen
body=body, headers=headers)
File "/usr/lib/python2.7/dist-packages/urllib3/connectionpool.py", line 308, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib/python2.7/httplib.py", line 1001, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python2.7/httplib.py", line 1035, in _send_request
self.endheaders(body)
File "/usr/lib/python2.7/httplib.py", line 997, in endheaders
self._send_output(message_body)
File "/usr/lib/python2.7/httplib.py", line 850, in _send_output
self.send(msg)
File "/usr/lib/python2.7/httplib.py", line 826, in send
self.sock.sendall(data)
File "/usr/lib/python2.7/dist-packages/urllib3/contrib/pyopenssl.py", line 208, in sendall
return self.connection.sendall(data)
File "/usr/lib/python2.7/dist-packages/OpenSSL/SSL.py", line 969, in sendall
raise TypeError("buf must be a byte string")
TypeError: buf must be a byte string

This looks related to this:
https://github.com/pyca/pyopenssl/issues/15

Is someone interested in looking into resolving this issue? I don't use this tool any more so have little desire to look into potential bug fixes.

It looks like the problem is pyopenssl, I'll close the issue 'cus isn't a bug of the bot, thanks for the answer!


[QUESTION] FASTAPI I18N Internationalization

Hi,
I have database translations. I follow this tutorial to implement in fastapi :
https://sqlalchemy-utils.readthedocs.io/en/latest/internationalization.html
my endpoint:
@router.get("/", response_model=List[usrRole])
def read_roles(
    db: Session = Depends(get_db),
    skip: int = 0,
    limit: int = 100,
    current_user: DBUser = Depends(get_current_active_user),
    language: str = Cookie(None),
):

my db_model :
# For testing purposes we define this as simple function which returns
# locale 'fi'. Usually you would define this function as something that
# returns the user's current locale.
def get_locale():
    return 'fi' <<< **how to get language cookie here ....**

translation_hybrid = TranslationHybrid(
    current_locale=get_locale,
    default_locale='en'
)

class usrRole(Base):
    __tablename__  = MODULE_NAME + 'role'
    __table_args__ = ({ "schema": DATABASE_SCHEMA})

    role_id           = Column(Integer,   primary_key=True, index=True)
    name_translations = Column(HSTORE)

    # translated column
    name = translation_hybrid(name_translations)

All works fine but ...only with 'fi' value :)  How to get language cookie value in the db_model ?
Regards
Frédérik

You will need to add a Cookie parameter to your get_current_active_user dependency, and then pass it to the get_locale method somehow. This is a question for sql_alchemy_utils. FastAPI is mainly an async framework, but this code appears to have been written for frameworks like Flask that use thread-locals to access request information. I would recommend you to implement your own i18n, or use a different library.

Thanks retnikt.
However I find this plugin very useful and FASTAPI users could be interested (at least those using postgreSQL).
After a lot of research I found someone :) https://github.com/omrihar who did a great job of making this plugin work with a middleware ! He gave me his method and in a few minutes I was able to use TranslationHybrid with FASTAPI.
In the same way I could easily communicate the current active user to my audit mixin to update created_by and updated_by table field.
It works perfectly :)
So I can close this issue.

Thanks for the help here @retnikt ! :clap: :bow:
Thanks for reporting back and closing the issue @maverick42  :+1:

Thanks retnikt.
However I find this plugin very useful and FASTAPI users could be interested (at least those using postgreSQL).
After a lot of research I found someone :) @https://github.com/omrihar who did a great job of making this plugin work with a middleware ! He gave me his method and in a few minutes I was able to use TranslationHybrid with FASTAPI.
In the same way I could easily communicate the current active user to my audit mixin to update created_by and updated_by table field.
It works perfectly :)
So I can close this issue.

Be great if you could share with the rest of us. :)

@maverick42 It would be great if you can share some information about the solution you found :) I am currently trying to figure out how to pass a parameter to get_locale() and so far, I don't see how that's possible from a middleware.

I just found https://github.com/tomwojcik/starlette-context. This looks like it should work :)

maverick42

So... which is the solution?
Thanks in advance!

Solution:
`from contextvars import ContextVar
from sqlalchemy_utils import TranslationHybrid
from starlette.middleware.base import BaseHTTPMiddleware, RequestResponseEndpoint
from starlette.requests import Request
POSSIBLE_LOCALES = ["en", "es"]
DEFAULT_LOCALE = "en"
_lang: ContextVar[str] = ContextVar(DEFAULT_LOCALE, default=None)
def get_language() -> str:
return _lang.get()
translation_hybrid = TranslationHybrid(
current_locale=get_language,
default_locale=DEFAULT_LOCALE
)
class RequestContextMiddleware(BaseHTTPMiddleware):
async def dispatch(
self, request: Request, call_next: RequestResponseEndpoint
):
try:
lang = request.headers["accept-language"]
user_language = lang if lang in POSSIBLE_LOCALES else DEFAULT_LOCALE
except:
user_language = DEFAULT_LOCALE
language = _lang.set(user_language)
response = await call_next(request)
    _lang.reset(language)

    return response

`
Add the middleware to the fastapi app
app.add_middleware(RequestContextMiddleware)


[WIP] chore: switch to AVA

This PR switches our tests to AVA. It's very much still a work in progress.
Because switching to a whole new testing framework is a very large task, this was all done with a codemod (basically, a babel plugin which re-writes our tests. It's in the codemods folder if you're interested). Immediately after running the codemod, ~2/3 of our tests passed with AVA. (Which is pretty good). The rest are going to have to be fixed by hand (still waaay faster than doing it all manually).
I'll be continually updating this PR as I fix more of the tests.
I'm opening this PR so early in the process because:

I want other people to be aware of it, and
I'd like to get as many eyes on the changes as possible, to correct any errors.

Things which need to get done:

[x] Run the codemod.
[x] Add ava to package.json as a devDependency and as the npm run test script.
[x] Fix all the tests on unix
[x] Separate out tests that were merged together as part of the refactoring (look for @@TEST)
[x] Fix lint errors
[x] Fix all the tests on Windows (some tests need to be skipped or modified, like chmod)
[ ] Remove useless tests (that were a result of refactoring errors)
[ ] Make sure all tests have useful and descriptive names
[x] Refactor all tests to run in their own isolated temp directory
[x] Properly parallelize all the tests
[x] Delete the codemod files
[ ] Verify that we didn't remove any tests (this is probably a file-by-file process)
[ ] Make sure tests aren't flaky
[ ] Fix all TODOs

Saw this, looks pretty good! Here's some initial questions:

Can we add some beforeEach steps to the tests to make sure they all start in a standardized wishing directory, with the same contents in the test directory, etc?
I noticed that you unwrapped the callbacks in echo. Doesn't this mean that those test cases will report success before actually calling the callbacks (which is where the real test is)? Is there any way to prevent that from happening?
I saw that the tests were in es6. Will Ava take care of the translation? It may be worth it to write the tests in es 5 if it cuts down on deps.

@ariporad the only thing that needs to be done to fix the remaining test cases is to fix plugin.js. If this were mocha, I could fix it, but I'm not sure what the convention is for ava. Here's what I want to do:
describe('before doing plugin', () => {
  it('does not exist before being registered', () => {
    t.is(!shell.foo);
  });
});
describe('before doing plugin', () => {
  beforeEach(() => {
    plugin.register('foo', fooImplementation, {
      cmdOptions: {
        'f': 'flag',
      },
      wrapOutput: true,
      canReceivePipe: true,
    });
  });

  afterEach(() => {
    // do something to un-register the plugin
  });

  it('exists after registering', () => {
    t.is(shell.foo);
  });
});

I'm not sure what the equivalent of describe is in ava, but basically I need a way to make sure the plugin is not registered before some of the tests, and is registered before some other tests, so I need a different beforeEach() step depending on the test.

@nfischer: Wow... you did a lot!
Your questions, in order:

We could.
We'd need to use test.cb.
AVA automagically babels the tests, but not the source.
You'd need a seperate test file, there is no describe in AVA.

I'm going to be busy till tomorrow morning, but I'll try to review everything then.

@ariporad would we be able to serialize the tests within plugin.js (once everything else is parallel by default)? It seems like test.serial() would work for us, but I'm not sure if we only need to put it on the first test case or if we need to put it on all the test cases in that file.

@ariporad I'll leave the rest of this to you, since there shouldn't be much more. Ping me on here when it's ready for review 😄

@nfischer: Ok, this should be good now, it all passes lint. I don't have a way to test on windows, but otherwise should be good.

@ariporad the tests are failing because we used to skip some tests when running on Windows (chmod was notorious for that). If you check master branch, you'll see which test cases to skip. Probably the best way I can think of is:
test('title', t => {
  if (windows) return;
  // otherwise proceed as normal
});

@ariporad are we still working on this? If so, would you be able to rebase this off master?

@freitagbr (and any one else), feel free to help take this on. Tests are still very flaky when run in parallel mode.

Also, here's a running list of the files I've verified have not lost any test cases during the refactor:

[ ] cat.js
[ ] cd.js
[ ] chmod.js
[ ] common.js
[ ] config.js
[ ] cp.js
[ ] dirs.js
[ ] echo.js
[ ] env.js
[ ] exec.js
[ ] find.js
[ ] global.js
[ ] grep.js
[ ] head.js
[ ] ln.js
[ ] ls.js
[ ] mkdir.js
[ ] mv.js
[ ] pipe.js
[ ] plugin.js
[ ] popd.js
[ ] pushd.js
[ ] pwd.js
[ ] rm.js
[ ] sed.js
[ ] set.js
[ ] shjs.js
[ ] sort.js
[ ] tail.js
[ ] tempdir.js
[ ] test.js
[ ] toEnd.js
[ ] to.js
[ ] touch.js
[ ] uniq.js
[ ] which.js

I think I know why the tests are failing. Let's look at grep.js for example:
let TMP;

test.beforeEach(() => {
  TMP = utils.getTempDir();
  shell.config.silent = true;
  shell.cp('-r', 'resources', TMP);
});

Isn't the value of TMP going to be overwritten with every test? So one of the grep tests is looking to see if the TMP exists, but the value of TMP intended for that test has already been overwritten by the value of TMP for another test.
In other words, we can't have any globals in these async tests. That, or we keep a stack or something of all the tmp directories that get created.

Solution to the problem, do something like this:
test.beforeEach(t => {
  const tmp = t.context.tmp = utils.getTempDir();
  shell.config.silent = true;
  shell.cp('-r', 'resources', tmp);
});

test('example' t => {
    // t.context.tmp is the tmp dir for this test
});

@freitagbr ah, that looks perfect. That's just what I was looking for. I'll do the refactor tonight and push again

@nfischer I already wrote the code to test it. Can I submit a PR to this branch?

Even after fixing that bug, I still get an error:
> ava test/*.js

   451 passed
   1 failed

   1. tail › reading more lines than are in the file (no trailing newline)

  t.is(result.toString(), 'test2\ntest1')
              |
              "test1\ntest1"

      "test1/ntest1"
        Test.fn (tail.js:74:5)
        _combinedTickCallback (internal/process/next_tick.js:67:7)
        process._tickCallback (internal/process/next_tick.js:98:9)

@freitagbr whoops, didn't see your comment. Take a look at the commit I just uploaded here. If I missed anything, feel free to correct it

Alright. Since we're starting to get merge conflicts with other patches that are going through, and I'm tired of rebasing, I think we should start merging these files one at a time. Here's the proposed strategy to do this in a sane way:

make a directory called ava-test/
copy the resources to ava-test/resources/ (leave a copy where it is now, too)
one by one, remove a file from test/ and put its ava equivalent in ava-test/
modify npm test: instead of node scripts/run-tests, turn it into node scripts/run-tests && ava --serial ava-test/*.js

Once all tests are refactored like this, we just do rm -rf test/ && git mv ava-test test.
@freitagbr what are your thoughts on this plan?

I think that's a good plan. Just keep an eye community contributions, they might get confused as to where their tests should go.

Closing this, since we're almost done migrating all the tests


Invalidate cache when the bucket is updated

https://docs.aws.amazon.com/macie/latest/APIReference/datasources-s3.html#datasources-s3-prop-bucketmetadata-lastupdated

There is no API to get last midified time of a bucket. So we cannot detect when to Invalidate cache efficuently.


Remote Debugging @ngrx/store with nativescript

Basically give an official solution for Remote Debugging @ngrx/store with nativescript
https://github.com/zalmoxisus/remote-redux-devtools
Currently is only logging in console but as you might know big states are too verbose and hard to read.
Nothing like have the remote dev tools.
React Native is currently supporting this.
https://github.com/chentsulin/react-native-counter-ios-android
Thanks!

Are there any updates on implementing this feature in NS?

Would be a great help if we can have an ngrx console for NS Debugging. Its the only missing feature for a great dev experience

https://github.com/edusperoni/ngrx-ns
This project is a POC that currently works with ngrx. Still no router support (not even sure it's possible with NS). I was working on making it a plugin but haven't got the time since then.

@edusperoni... I thought I'd leave you here a comment as well... I've seen your POC and it has one interesting detail, removing the dep from "connect" and an added class. But it doesn't work yet, still complaining about "browser" which (obviously) doesn't exist in N..... So, I hope you can help me out! Cheers Lars

Any progress on this? I'm willing to help too, if somebody can point me in the right direction.

Any Progress on this?


Draft plugin caller hiding errors

While running a plugin an error may occur, the only output from draft will be
Error: plugin "myplugin" exited with error
This should show more output on plugin error.

I think this might have been my shell. Closing for now.


Failed to mount rootfs component with overlay filesystem

Environmental Info:
K3s Version: v1.17.5+k3s1

Node(s) CPU architecture, OS, and Version: Raspberry Pi 3B+ with Alpine Linux ARM64

Cluster Configuration: 1 master, 2 workers

Describe the bug:

Both the master and the workers are unable to mount rootfs and thus to create pods. I have /var/lib/rancher created as overlay folder stored on a ext4 storage. The overlay file system has been created following the steps described in https://wiki.alpinelinux.org/wiki/Raspberry_Pi#Persistent_storage, in particular the example about /usr.
Steps To Reproduce:

Just install k3s

Additional context / logs:

Example of log:
E1227 18:19:01.035016    3323 pod_workers.go:191] Error syncing pod 095adbda-54ef-4818-9ea2-12f6c4b4aa35 ("coredns-6c6bb68b64-nbzzs_kube-system(095adbda-54ef-4818-9ea2-12f6c4b4aa35)"),
skipping: failed to "CreatePodSandbox" for "coredns-6c6bb68b64-nbzzs_kube-system(095adbda-54ef-4818-9ea2-12f6c4b4aa35)" with CreatePodSandboxError: "CreatePodSandbox for pod \"coredns-6c6bb68b64-nbzzs_kube-system(095adbda-54ef-4818-9ea2-12f6c4b4aa35)\"
failed: rpc error: code = Unknown desc = failed to create containerd task:
failed to mount rootfs component &{overlay overlay [workdir=/var/lib/rancher/k3s/agent/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/230/work upperdir=/var/lib/rancher/k3s/agent/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/230/fs lowerdir=/var/lib/rancher/k3s/agent/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/1/fs]}:
invalid argument: unknown"

In a more readable format, containerd is trying to mount these dirs:
lowerdir= /var/lib/rancher/k3s/agent/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/1/fs
upperdir=/var/lib/rancher/k3s/agent/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/230/fs
workdir= /var/lib/rancher/k3s/agent/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/230/work

Does it throw because maybe it's not possible to use /var/lib/rancher/k3s/agent/containerd/io.containerd.snapshotter.v1.overlayfs/snapshots/230/fs as upperdir since /var/lib/rancher is a lowerdir and the actual upperdir is /media/persist/rancher on my device?

Updating to v1.19.5+k3s2 and using --snapshotter native removes the error but I have the following warning now:
E1227 21:05:03.699917    2384 cri_stats_provider.go:376] Failed to get the info of the filesystem with mountpoint "/var/lib/rancher/k3s/agent/containerd/io.containerd.snapshotter.v1.native": unable to find data in memory cache.
 Stats initialization may not have completed yet: invalid capacity 0 on image filesystem

The node description also shows temporary disk pressure:
  Normal   Starting                 33m                    kube-proxy  Starting kube-proxy.
  Normal   Starting                 33m                    kubelet     Starting kubelet.
   Wanted to free 61165568 bytes, but freed 274812 bytes
  Warning  FreeDiskSpaceFailed      13m                    kubelet     failed to garbage collect required amount of images. Wanted to free 60198912 bytes, but freed 7503 bytes
  Warning  ImageGCFailed            13m                    kubelet     failed to garbage collect required amount of images. Wanted to free 60198912 bytes, but freed 7503 bytes
  Warning  FreeDiskSpaceFailed      3m37s (x2 over 8m37s)  kubelet     failed to garbage collect required amount of images. Wanted to free 60166144 bytes, but freed 0 bytes
  Warning  ImageGCFailed            3m37s (x2 over 8m37s)  kubelet     failed to garbage collect required amount of images. Wanted to free 60166144 bytes, but freed 0 bytes

I don't think you can nest overlayfs mounts like that, at least without the kubelet getting very confused. /var/lib/rancher/k3s or wherever you have your data-dir pointed should be a standard filesystem (ext4/xfs/btrfs) that is supported as an overlayfs lowerdir.

I don't think you can nest overlayfs mounts like that, at least without the kubelet getting very confused. /var/lib/rancher/k3s or wherever you have your data-dir pointed should be a standard filesystem (ext4/xfs/btrfs) that is supported as an overlayfs lowerdir.

There is definitely something wrong with using an overlay fs to store k3s and containerd data, I'll try to configure my cluster to use a more standard fs. Using an overlay fs along with Alpine local backup was a nice experiment but I guess it doesn't play nice with containerd assumptions about the fs


Updated installation guide in ReadMe

Fixes Issue
Closes #288

Changes proposed
Wrote a note for .env file creation.

Check List (Check all the applicable boxes)

[x] My code follows the code style of this project.
[x] My change requires changes to the documentation.
[x] I have updated the documentation accordingly.
[x] All new and existing tests passed.
[x] This PR does not contain plagiarized content.
[x] The title of my pull request is a short description of the requested changes.

Screenshots

Note to reviewers

@Cahllagerfeld kindly review


candy machine creation error

Hi,
=== Verifying assets and metadata ===
=== Upload assets to storage solution ===
Continuing previous storage upload...
Files that failed to upload: []
All images were uploaded successfully
=== Creating Candy Machine ===
Traceback (most recent call last):
File "C:\apt\AptosNFTMint\script\src\cli.py", line 19, in
candy_machine.create()
File "C:\apt\AptosNFTMint\script\src\candy_machine.py", line 119, in create
self.createCandyMachine()
File "C:\apt\AptosNFTMint\script\src\candy_machine.py", line 141, in createCandyMachine
self.rest_client.wait_for_transaction(txn_hash)
File "C:\Python311\Lib\site-packages\aptos_sdk\client.py", line 171, in wait_for_transaction
assert (
AssertionError: {"version":"44301869","hash":"0x014bc0edbf...gas_used":"150","success":false,"vm_status":"Transaction Executed and Committed with Error LINKER_ERROR","accumulator_root_hash":"0...
What is the problem?
Thanks,

+1

Hi, === Verifying assets and metadata === === Upload assets to storage solution === Continuing previous storage upload... Files that failed to upload: [] All images were uploaded successfully === Creating Candy Machine === Traceback (most recent call last): File "C:\apt\AptosNFTMint\script\src\cli.py", line 19, in candy_machine.create() File "C:\apt\AptosNFTMint\script\src\candy_machine.py", line 119, in create self.createCandyMachine() File "C:\apt\AptosNFTMint\script\src\candy_machine.py", line 141, in createCandyMachine self.rest_client.wait_for_transaction(txn_hash) File "C:\Python311\Lib\site-packages\aptos_sdk\client.py", line 171, in wait_for_transaction assert ( AssertionError: {"version":"44301869","hash":"0x014bc0edbf...gas_used":"150","success":false,"vm_status":"Transaction Executed and Committed with Error LINKER_ERROR","accumulator_root_hash":"0...
What is the problem? Thanks,

How did you solve it?

Hi, dont change contract address only cmpublic (your address) cmprivate(yourprivatekey)


Testers needed for Parallels and Vmware Fusion Prior to putting pull request

I have created a modification using the vagrant box "bento/ubuntu-16.04" which supports virtualbox, vmware (fusion and workstation) and parallels providers.  (see https://github.com/agiletechnologist/gitlab-installer to clone for testing). I  have tested 2 of 6 tested. LXC did not change.
Changes

Vagrantfile - Changed default box to "bento/ubuntu-16.04"
Vagrantfile - Changed  vmware_fusion to be vmware_desktop which will work with both vmware_fusion and vmware_workstation providers and removed override of the box for vmware_desktop
Vagrantfile - fixed default for GITLAB_CPUS to match Documentation default of 2
README.md - for new minimum  memory default for GITLAB_MEMORY of 3072
install-gitlab.sh - Added apt-get upgrade before installation to apply updates and security updates before installing.

Providers checked:

[x] virtualbox on Windows (Completed)

[ ] virtualbox Linux

[ ] virtualbox Mac

[x] vmware_workstation  Windows (Completed)

[ ] vmware_workstation Linux

[ ] vmware_fusion Mac

[ ] Parallels Mac

[ ] LXC Linux Containers

Thanks for any help.

Hello @agiletechnologist! I took a sneak peek into your fork and changes, and it looks very good!  I will test both Mac and Linux Virtualbox providers and Mac Parallels provider later this week.
LXC support I wouldn't consider necessary. LXC is quickly becoming/became obsolete with LXD and Docker gaining support. Also even partial VMware support is better than no support. I'd encourage you to send pull request already.

@tuminoid The Pull request is created #17

Tested virtualbox Linux on ubuntu should work on other distros as the host.

I've tested the Mac Parallels and Virtualbox 5.2, and found no issues.
As commented above, this is improvement even with LXC and VMWare/Mac being untested, and I will merge the pull request now. Thank you for the contribution!


Missing [workflow_engine] in st2.conf.sample

SUMMARY
https://github.com/StackStorm/st2/blob/master/conf/st2.conf.sample is missing a new section for [workflow_engine]
Also, shouldn't this section be named [workflowengine] to go along with the "style" of the other sections like [resultstracker] , [garbagecollector], etc
ISSUE TYPE

Bug Report
Feature Idea

STACKSTORM VERSION
2.8
EXPECTED RESULTS
https://github.com/StackStorm/st2/blob/master/conf/st2.conf.sample contains a section for [workflow_engine]

Thanks for reporting this - will push a fix.


Create Beacon Contract

We need to create the same send/receive experience that wallets have:

Unified recipient address
Sends/withdrawals come from the same recipient address
We need a component registry to hold the beacon contract and the notary implementation addresses.
We need the ledger to be able to detect notary overrides.

I removed the scope of the notary plugging in because it's actually critical that the notary is fully trusted.
For the beacon contract, I ended up with IVirtualAddress, VirtualKeyAddress, and KeyAddressFactory.
For the component registry, I opted for a simple PostOffice construct to store virtual key addresses.