Feat(logger): log event functionality

Description of your changes
This PR introduces a new functionality: logging Lambda events. Developers can opt in for this behaviour by one of the following methods:

passing the parameter logEvent set to true to the injectLambdaContext middleware
passing the parameter logEvent set to true to the injectLambdaContext decorator
setting the env var POWERTOOLS_LOGGER_LOG_EVENT to through while using the injectLambdaContext middleware/decorator

Note that this functionality is only available when using a middleware or decorator.
The Lambda invocation will then print one log item with the following key-value pairs:

logLevel INFO
message key with value Lambda invocation event
event key with the current Lambda invocation event as value

Logging a Lambda event is very typical use of a logger in AWS Lambda. This logic aims to simplify and reduce the code that developers need to maintain.

How to verify this change

See E2E tests results.
To see the docs:
npm run docs-website-build-run

Related issues, RFCs

#482
PR status
Is this ready for review?: YES
Is it a breaking change?: NO
Checklist

[x] My changes meet the tenets criteria
[x] I have performed a self-review of my own code
[x] I have commented my code where necessary, particularly in areas that should be flagged with a TODO, or hard-to-understand areas
[x] I have made corresponding changes to the documentation
[ ] I have made corresponding changes to the examples
[x] My changes generate no new warnings
[x] The code coverage hasn't decreased
[x] I have added tests that prove my change is effective and works
[x] New and existing unit tests pass locally and in Github Actions
[x] Any dependent changes have been merged and published in downstream module
[x] The PR title follows the conventional commit semantics

Breaking change checklist

[ ] I have documented the migration process
[ ] I have added, implemented necessary warnings (if it can live side by side)

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

E2E tests:
https://github.com/awslabs/aws-lambda-powertools-typescript/actions/runs/2549417761


feat: pass styling to hippo microwallet

corresponding issue on hippo, see this

This feature is now active (https://github.com/thencc/hippo/commit/cd9039ad54109616b5c2ca187faf132c6dcb55fb), we just need to document it.


Cannot connect after password reset

Issue Type: Bug
I reset my Azure password and now I cannot connect to any of my Azure databases.  The console is showing this error.
"invalid_grant","error_description":"AADSTS50173: The provided grant has expired due to it being revoked, a fresh auth token is needed. The user might have changed or reset their password.
Azure Data Studio version: azuredatastudio 1.30.0 (59c4b8e90cf2d3a24bed72623197f10f8d090fdc, 2021-06-16T18:57:01.467Z)
OS version: Darwin x64 20.5.0

System Info

Item
Value

CPUs
Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz (12 x 2600)

GPU Status
2d_canvas: enabledgpu_compositing: enabledmetal: disabled_offmultiple_raster_threads: enabled_onoop_rasterization: enabledopengl: enabled_onprotected_video_decode: unavailable_offrasterization: enabledskia_renderer: disabled_off_okvideo_decode: enabledwebgl: enabledwebgl2: enabled

Load (avg)
2, 2, 2

Memory (System)
16.00GB (0.74GB free)

Process Argv

Screen Reader
no

VM
0%

Extensions (5)

Extension
Author (truncated)
Version

admin-pack
Mic
0.0.2

agent
Mic
0.48.0

dacpac
Mic
1.8.0

import
Mic
1.3.0

profiler
Mic
0.11.0

Duplicate of #14159


After SSS execution hangs, the SSS is no longer invoked

 Issue by kbrandwijk
Monday Sep 04, 2017 at 00:08 GMT
Originally opened as https://github.com/graphcool/api-bugs/issues/252

What is the current behavior?
If you are writing a SSS, and due to a mistake in your code the SSS hangs indefinitely, it is never invoked again after that.
Please share the relevant part of your GraphQL schema and all functions, permissions or other project settings for easier reproduction
Minimal reproduction example: Create a SSS with the function below:
module.exports = function (event) {
  console.log(event.data)
  return new Promise(function (resolve, reject) {})
  //return {data: event.data}
}

Do a test run. This will hang forever. Save the function.
Reopen the function and change back to normal:
module.exports = function (event) {
  console.log(event.data)
  //return new Promise(function (resolve, reject) {})
  return {data: event.data}
}

Test run will complete successfully.
Now, when you trigger the SSS, it is not invoked.
The only option is to create a new SSS, and copy paste query + code.
What is the expected behavior?
SSS should continue to invoke normally, after the code error is fixed.

@kbrandwijk just to make sure - after you change the code back to normal and do a test run. Do you remember to save the function again?

Yes, whatever I do after that, the function will never run again.

I cannot reproduce this. I proceeded as you described. When I trigger the function, it is invoked as expected.
Therefore, I'll close this.

I can't reproduce this either.


.ahk and .au3 support for developer previewer

Description of the new feature / enhancement
@Aaron-Junker
As discussed in .vbs and .inf support for developer previewer
AutoHotkey files (.ahk) show as no preview available and AutoIt (.au3) show but only in monochrome text.
There is no syntax highlight definition for au3 and ahk in Monaco but they both have extensions to provide syntax highlighting in VS Code that are available on Github
AutoHotkey Plus Plus
AutoIt-VSCode
It should be possible to convert them from json to the correct format.
Scenario when this would be used?
These are common file formats so support for these would be a great enhancement
Supporting information
No response

I think this would be more "allow for additional syntax to be loaded in like VS Code."  That i feel like is the better solution


MKV Element SimpleBlock typo

The Matroska element by 0xA3 is SimpleBlock. MediaTrace contains a typo and names this Block, which is a different element.

MediaInfoLib related

moved to https://github.com/MediaArea/MediaInfoLib/issues/170


Edge Canary is [also] detected as Chrome

Edge Canary news release: Introducing the first Microsoft Edge preview builds for macOS
Edge Canary mac official download
Edge Canary is [also] detected as Chrome

https://github.com/biggora/express-useragent/issues/103

https://github.com/biggora/express-useragent/issues/103

@june50232 Could you add a useragent?

https://github.com/biggora/express-useragent/issues/100

@mimmi20
also windows10 edge
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/18.17763

I'm still getting Edge showing up as Chrome on MacOS with this UA: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.129 Safari/537.36 Edg/81.0.416.68
I believe the PR from #114 is missing a regex change on this line as well --> https://github.com/biggora/express-useragent/blob/master/lib/express-useragent.js#L103
AFAICT, that line ought to also have edg as part of the match pattern, same as what was added to _Versions in the PR.


How the field input binds to the model in the new builder

@davidlgj Your articles on medium helped a lot to understand the new builder you are working on; however, I am having hard time to understand how the field binds to the model right now? Is sfSelect obsolete?  If so, how do you decide which deep variable to be bound in the fieldset/array?
Above question will greatly help me to complete fieldset and array migration to react-schema-form.
https://github.com/networknt/react-schema-form
Thanks.

Wow, you have really gotten some work done there lately, @stevehu!
Is there any common code that can be shared between the projects?
WRT @davidlgj, he has been on parental leave for a while now, don't know when he's back, he haven't been on gitter either although you could try there.

@nicklasb I have tried to put some common functions into the utils module but modified some of them. As you can see from the demo, it works so far. react is much easier than angular:)

@stevehu, yes, React is a different approach.
In my opinion, React is more for web sites and Angular more for web-based desktop applications if you know what I mean. Or at least that would be where I make the choice.

@nicklasb I had been working on Angular 1.x for over two years before switching to React. It wasn't easy as I had over 100 angular components need to be rewritten in my framework:( I don't know the current angular 2.0 status as it is none of my business. In my opinion, angular is suitable for small applications as the component encapsulation is poor. Once you have dozens components interact with each other, you will be lost in the communication. I will write an article to compare them once I have time.

I'm going to close this if that's ok @stevehu as this conversation can happen on Gitter more easily now as we move toward a unified core. Hope you got some of the info you were after by now :)

Yes. I worked off an old version of the builder and it is relatively de-coupled with Angular. Thanks.


Update variables from IDS with adjustments to Jetto variables

Find  a way to update jetto variables from IDS with adjustments (when not implemented in Jetto)

This might be in the scope of Jetto, then we would only have to update IDS variables
[ ] Coupling IDS and Jetto variables might do the trick here, although if there is a complex mathematical relationship this would probably not work
[ ] Find a way to have "post functions" which execute on every case in the generated ensemble and can do arbitrary work on those ensembles

More ideas are welcome :)
Code snippet with how its currently done:
https://github.com/CarbonCollective/fusion-dUQtools/blob/9de484fd6fb26226325d93ac812877de9c2cef00/scripts/prepare_im_runs.py#L341-L355

Again to understand what you want to do here I would need an example use case...

I think we pretty much covered this with #494 and #502


⚠ Bofrost.fr has degraded performance

In 6d5b0b4, Bofrost.fr (https://www.bofrost.fr) experienced degraded performance:

HTTP code: 200
Response time: 1553 ms

Resolved: Bofrost.fr performance has improved in 0529a4b after 6 minutes.


Pseudo pool

This pull request adds pseudo-pooling to all DADA2 workflows: denoise-single, denoise-pyro, and denoise-paired. It is implemented in a way that should keep memory costs flat, and barely higher than they are when not using pseudo-pooling.
Pseudo-pooling is activated by the new parameter pooling-method = pseudo. It's main effect is to increase sensitivity to rare variants in samples, particularly singletons, as long as they were observed in other samples independently.
This passes testing on my end based on Rscript invocations, but python based testing still hasn't been performed, and no new pseudo-pooling specific tests have been added.
This addresses https://github.com/qiime2/q2-dada2/issues/87 but I haven't added full pooling yet (which is much more memory/time intensive).

I'm not sure how to deal with the unit-tests and python testing. In principle, the current tests should all pass as the output using the default pooling-method = independent should be unchanged from the previous output.
I realize this is probably too late for the upcoming release.

Hey @benjjneb - no rush to reply, but are there any updates on the denoise-pyro discrepancies? We are about 2 weeks out from the next scheduled QIIME 2 release, and trying to see what outstanding PRs might make the release. Do you think we should include this PR, or defer to the next release (tentatively August)?

Great, thanks for the update, @benjjneb. Let me know what we can do on our end, when you know it, and we'll be there.

The denoise-pyro bug that caused the change in test results should be fixed by e91ee9403195c92270fd9635ee7a711a8d19ea1c


PANIC: timer has gone away

Hi Prisma Team! My Prisma Client just crashed. This is the report:
Versions

Name
Version

Node
v18.20.3

OS
debian-openssl-1.0.x

Prisma Client
5.18.0

Query Engine
4c784e32044a8a016d99474bd02a3b6123742169

Database
mysql

Logs
prisma:tryLoadEnv Environment variables not found at null
prisma:tryLoadEnv Environment variables not found at /home/bhaira5/unifydaily-admin.wishnow.app/.env
prisma:tryLoadEnv No Environment variables loaded
prisma:client checkPlatformCaching:postinstall false
prisma:client checkPlatformCaching:ciName
prisma:tryLoadEnv Environment variables not found at null
prisma:tryLoadEnv Environment variables not found at /home/bhaira5/unifydaily-admin.wishnow.app/.env
prisma:tryLoadEnv No Environment variables loaded
prisma:client dirname /home/bhaira5/unifydaily-admin.wishnow.app/node_modules/.prisma/client
prisma:client relativePath ../../../prisma
prisma:client cwd /home/bhaira5/unifydaily-admin.wishnow.app/prisma
prisma:client clientVersion 5.18.0
prisma:client:libraryEngine internalSetup
prisma:get-platform Don't know any platform-specific paths for "undefined" on x64 (x86_64)
prisma:get-platform Falling back to "ldconfig" and other generic paths
prisma:client:libraryEngine sending request, this.libraryStarted: false
prisma:get-platform Command "ldconfig -p | sed "s/.*=>s*//" | sed "s|.*/||" | grep libssl | sort | grep -v "libssl.so.0"" successfully returned "libssl3.so
libssl.so
libssl.so.10
libssl.so.1.1
"
prisma:get-platform Found libssl.so file using "ldconfig" or other generic paths: libssl3.so
libssl.so
libssl.so.10
libssl.so.1.1

prisma:get-platform The parsed libssl version is: 1.0.x
prisma:get-platform Distro is "undefined". Falling back to Prisma engines built for "debian".
prisma:client:engines:resolveEnginePath enginePath /home/bhaira5/unifydaily-admin.wishnow.app/node_modules/.prisma/client/libquery_engine-debian-openssl-1.0.x.so.node
prisma:client:libraryEngine library starting

Client Snippet
// PLEASE FILL YOUR CODE SNIPPET HERE

const createUserIntoDB = async (props: User) => {
  const isUserExist = await prisma.user.findUnique({
    where: {
      phoneNumber: props?.phoneNumber as string,
    },
  });
  //  check is user
  if (isUserExist) {
    throw new ApiError(httpStatus.BAD_REQUEST, 'This user already existed!');
  }

  const newPassword = await isUserPasswordConvertBcrypt(props?.password);
  // database
  const res = await prisma.user.create({
    data: {
      ...props,
      password: newPassword,
    },
    select: UserSelect,
  });

  return res;
};
const loginUserWithDB = async (props: User) => {
  // database
  const res = await prisma.user.findUnique({
    where: {
      phoneNumber: props?.phoneNumber as string,
    },
  });

  if (!res) {
    throw new ApiError(httpStatus.BAD_REQUEST, "User doesn't exist!");
  }
  //
  const { password, ...responseWithoutPassword } = res;

  //
  const isMatchPassword = await isUserPasswordMatch(props?.password, password);

  if (!isMatchPassword) {
    throw new ApiError(httpStatus.BAD_REQUEST, "Password doesn't match.");
  }

  //  email and roll
  const { role, phoneNumber, id } = responseWithoutPassword;

  //  create access and refresh tokens
  const accessToken = jwtHelpers.createToken(
    { phoneNumber, role, id },
    config.jwt.secret as Secret,
    config.jwt.expires_in as string
  );
  // refresh Token
  const refreshToken = jwtHelpers.createToken(
    { phoneNumber, role, id },
    config.jwt.refresh_secret as Secret,
    config.jwt.refresh_expires_in as string
  );

  return {
    user: responseWithoutPassword,
    accessToken: accessToken,
    refreshToken: refreshToken,
  };
};

Schema
// PLEASE ADD YOUR SCHEMA HERE IF POSSIBLE
// This is your Prisma schema file,
// learn more about it in the docs: https://pris.ly/d/prisma-schema

generator client {
  provider = "prisma-client-js"
  binaryTargets = ["native","debian-openssl-1.0.x"]
}

datasource db {
  provider = "mysql"
  url      = env("DATABASE_URL")
}

// Define Role Enum
enum UserRole {
  admin
  agent
  user
}

// Define OrderStatus Enum
enum OrderStatus {
  success
  pending
  cancel
}

// Define VisitStatus Enum
enum VisitStatus {
  success
  pending
  cancel
}

model User {
  id          String        @id @default(uuid())
  name        String?
  email       String?       @unique
  phoneNumber String?       @unique
  password    String
  role        UserRole      @default(agent)
  address     String?
  profileImg  String?
  createdAt   DateTime      @default(now()) @db.Timestamp(6)
  updatedAt   DateTime      @updatedAt @db.Timestamp(6)
  Outlet      Outlet[]
  AssignRoad  AssignRoad[]
  AgentTarget AgentTarget[]

  @@map("users")
}

model Outlet {
  id           String      @id @default(uuid())
  banner       String
  visitingArea String
  location     String
  businessType String
  businessName String
  ownerName    String
  phoneNumber  String
  nextFollowup String?
  remarks      String?
  visitStatus  VisitStatus @default(pending)
  geoLocation  String?
  agentId      String
  agent        User        @relation(fields: [agentId], references: [id])

  createdAt DateTime @default(now()) @db.Timestamp(6)
  updatedAt DateTime @updatedAt @db.Timestamp(6)

  @@map("outlets")
}

model AssignRoad {
  id        String @id @default(uuid())
  agentId   String
  agent     User   @relation(fields: [agentId], references: [id])
  location  String
  startDate String
  endDate   String

  createdAt DateTime @default(now()) @db.Timestamp(6)
  updatedAt DateTime @updatedAt @db.Timestamp(6)

  @@map("assignRoads")
}

model AgentTarget {
  id          String @id @default(uuid())
  agentId     String
  agent       User   @relation(fields: [agentId], references: [id])
  month       Int
  outlet      Int
  workingDays Int
  flowUp      Int

  createdAt DateTime @default(now()) @db.Timestamp(6)
  updatedAt DateTime @updatedAt @db.Timestamp(6)

  @@map("agentTargets")
}

Prisma Engine Query

Hi there,
Could you try if any of these steps help?

First and foremost, check your .env file. Make sure it exists in the project root directory (/home/bhaira5/unifydaily-admin.wishnow.app/.env) and contains the correct DATABASE_URL.
Verify that your MySQL database is running and accessible using the connection string in your .env file.
Run npx prisma generate to ensure your Prisma Client is up-to-date with your schema.
If you've made any recent changes to your Prisma schema, run npx prisma migrate dev to apply those changes to your database.
Consider upgrading your system's OpenSSL version, as 1.0.x is quite old and might be causing compatibility issues.
Double-check that your Node.js version (v18.20.3) is fully compatible with Prisma 5.18.0. You might want to consider upgrading Node.js if necessary.
To get more detailed logs for troubleshooting, you can set the environment variable DEBUG="prisma:*" before running your application.

Hi @Md-Yousuf-sheikh
Unfortunately, your code snipped is missing a lot of context needed for us to run it. Could you please provide a bug reproduction in isolated github repository?
Thank you!

Closing this as a duplicate of https://github.com/prisma/prisma/issues/25526, which has more context than this discussion thread right here.


Strange focus behaviour for dynamic matMenu content

Bug, feature request, or proposal:
Bug
What is the expected behavior?
No menu item should be selected automatically
What is the current behavior?
I have a matMenu which contains an input field which can be used to filter the menu items. After entering the first character of the filter string, the input loses focus and one of the menu items is selected. After re-focussing the input and typing more, it behaves as expected
What are the steps to reproduce?
See this plunker http://plnkr.co/edit/dc3vNd4viVg2jM6Errtm?p=preview
Is there anything else we should know?
It worked on angular 2.4.5 and material 2.0.0-beta.1
Was broken after upgrading to 4.4.4 and beta.12

Looks like your plunker is failing:
Error: (SystemJS) XHR error loading https://unpkg.com/rxjs/operators/refCount.js
	Error: XHR error loading https://unpkg.com/rxjs/operators/refCount.js

Works for me on Chromium and Chrome 61

As a workaround, you can do something like the code bellow as soon as the filter value change:
@ViewChild(MatInput) input = MatInput;

...

setTimeout(() => this.input._elementRef.nativeElement.focus(), 200);

Plunk: http://plnkr.co/edit/hCg5lVZ1U5OFek31Vr0j?p=preview

Thanks for the suggestion. I build a similar workaround, binding the focus() call to the onBlur event of the input

Menus aren't really meant to be used for filtering, that's why focus ends up being stolen away from the input. I think what you're looking for is something like this which will be added to mat-select. If you really want to continue using a menu for it, you can go with the suggestion from @julianobrasil or create a custom menu panel by implementing the MatMenuPanel interface: https://github.com/angular/material2/blob/master/src/lib/menu/menu-panel.ts#L13.

Since the referenced PR looks to be dead, here's what I came up with:
<mat-menu #layoutsMenu="matMenu">
    <mat-form-field>
        <input #searchInput matInput (blur)="searchInput.focus()"
            (click)="$event.stopPropagation()">
    </mat-form-field>
</mat-menu>


Group inputfields are not working when using sublocations

It is possible to define inputfields (as a list) for groups. As described in the readme, this is a list of inputfield-ids to be measured at the locations of the group (trumped by the inputfields of each location). However, right now if there are no inputfields defined for the sublocation it simply gives all inputfield-ids defined instead of just the inputfield-ids that should be measured for the specific group.
This does work properly if no sublocations are provided, that is probaly also the reason that for colors the app is functioning as expected.
By the way, the app and the latest update are really appreciated!

When sublocations are used, the group needs to be defined for each sublocation, if you want to use the inputfields from the group. The inputfields of the group of the (parent) location are ignored.


confused by performance gap relative to zstd-safe

I'm encountering roughly 10x worse performance (speed) with zstd::block::Compressor::compress_to_buffer relative to zstd_safe::compress_using_cdict or zstd_safe::compress_cctx, and 4-5x worse decompression performance (speed):
test sender::tests::zstd_block_compressor_nodict_compress_to_buffer_3049_byte_json        ... bench:      14,652 ns/iter (+/- 204)
test sender::tests::zstd_block_compressor_with_dict_compress_to_buffer_3049_byte_json     ... bench:     119,456 ns/iter (+/- 730)
test sender::tests::zstd_block_decompressor_with_dict_decompress_to_buffer_3049_byte_json ... bench:      21,099 ns/iter (+/- 493)
test sender::tests::zstd_safe_compress_cctx_3049_byte_json                                ... bench:      14,732 ns/iter (+/- 85)
test sender::tests::zstd_safe_compress_using_cdict_3049_byte_json                         ... bench:       9,998 ns/iter (+/- 73)
test sender::tests::zstd_safe_decompress_dctx_3049_byte_json                              ... bench:       5,969 ns/iter (+/- 37)
test sender::tests::zstd_safe_decompress_using_ddict_3049_byte_json                       ... bench:       4,188 ns/iter (+/- 42)
test sender::tests::zstd_stream_encoder_with_dictionary_3049_byte_json                    ... bench:     306,225 ns/iter (+/- 1,511)

I noticed that zstd::block::Compressor is using zstd_safe::compress_with_dict, which accepts a byte slice of the dictionary instead of zstd_safe::compress_with_cdict, which accepts a "prepared" dictionary - perhaps that could be the issue? It's likely only significant for small data, but zstd is one of the best options for small data with the dictionary functionality, so it seems preferable to "prepare" the dictionary once, up front instead of every compression.

Yes, that could be the problem, because the documentation for zstd_safe::compress_using_dict function explain this: This function loads the dictionary, resulting in significant startup delay. So if you want to reuse dictionary, it is better to use zstd_safe::compress_using_cdict or create dictionary by zstd::dict::EncoderDictionary and then use zstd::stream::Encoder::with_prepared_dictionary.

Don't you think it would make more sense for the zstd::block::Compressor api to store prepared dictionary internally and use it for compress_to_buffer? The overhead of preparing the dictionary will happen at some point anyway. You could store an Option<_> for the cdict for when a dictionary is not in use, and match on it to decide which zstd_safe function to use. I'm happy to submit a pr with your ok.

I think zstd::block::Compressor and zstd::block:Decompressor  should implement the same API as stream Decoder and Encoder and provide with_prepared_dictionary method.

I agree ; I mostly focused on the encoder until now and didn't update the compressor when I added prepared dicts.

Ok. Do you think the underlying implementation should behave differently (i.e. store a &[u8] or Vec<u8> when with_dictionary is called, and store an &EncoderDictionary if with_prepared_dictionary is called? It seems like there's no good reason to store the bytes (either as &[u8] or Vec<u8> in a Compressor regardless of which method (with_dictionary or with_prepared_dictionary) is called, since even in the case of with_dictionary an EncoderDictionary (the zstd equivalent) will still be constructed.

Yeah, using the encoded one in all cases probably makes sense.
As for where the bytes belong, I still need to think a bit about this. May end up with a Cow or something similar.

According to the zstd docs, the underlying bytes used to construct the dictionary object can be moved/deleted/etc after construction - the CDict just uses them once on construction:
ZSTD_CDict* ZSTD_createCDict(const void* dictBuffer, size_t dictSize,
                             int compressionLevel);

  When compressing multiple messages / blocks with the same dictionary, it's recommended to load it just once.
  ZSTD_createCDict() will create a digested dictionary, ready to start future compression operations without startup delay.
  ZSTD_CDict can be created once and shared by multiple threads concurrently, since its usage is read-only.
  `dictBuffer` can be released after ZSTD_CDict creation, since its content is copied within CDict
  Note : A ZSTD_CDict can be created with an empty dictionary, but it is inefficient for small data.

However, there's a bit of a problem with matching the api of Encoder because Encoder::with_prepared_dictionary takes a &EncoderDictionary (using it once to start the stream context), whereas Compressor would store its dictionary, forcing it to track the lifetime of the underlying EncoderDictionary in everything it does. It would be much simpler for Compressor to simply own it's own EncoderDictionary, perhaps it could clone a &EncoderDictionary? It would be a somewhat misleading api, but it would match.

Ah nice, I must have misremembered that.
Regarding the API, I think it's fine to have Compressor use a different API and directly take a EncoderDictionary, letting users clone it if needed.
Right now, EncoderDictionary doesn't implement Clone, but I could update it to use Arc internally (since CDict is Send+Sync).

Actually the current Encoder::with_prepared_dictionary seems completely broken: ZSTD_initCStream_usingCDict expects the dictionary to outlive the context, which we don't enforce at all. Doh.

Actually the current Encoder::with_prepared_dictionary seems completely broken: ZSTD_initCStream_usingCDict expects the dictionary to outlive the context, which we don't enforce at all. Doh.

When it can be problem? Because I think Rust will not release dictionary memory before releasing whole Encoder. Or can you provide an example when this situation can happened?

fn create_encoder<W: Write>(w: W) -> io::Result<Encoder<W>> {
    let data = vec![1,2,3,4,5,6,7,8,9,0];
    let dict = EncoderDictionary::new(&data, 1);
    Encoder::with_prepared_dictionary(w, &dict)
}

zstd_safe::init_cstream_using_cdict mandates that the dict outlives the context. This means the context should have a lifetime, and the lifetime of the dict should outlive it.

Ah, another small issue: when using a pre-digested dictionary, we need to specify the compression level up-front. Currently, it is given in Compressor::compress_to_buffer.
Solutions might be:

Always specify the level when creating the Compressor, and disallow using the same compressor with multiple levels.
Cache one or more digested dictionaries, and re-digest it if a different compression level is used.

The problem with the first solution is that it also affects users who don't need dictionaries.

Ah, another small issue: when using a pre-digested dictionary, we need to specify the compression level up-front. Currently, it is given in Compressor::compress_to_buffer. Solutions might be:

The previously-named "block" module has now be renamed to "bulk" and refactored; it now uses a zstd context internally, and doesn't have that issue anymore.
I'll close this ticket as I think the core issue has been solved; feel free to re-open if you think it's not the case.


I switched to Smileupps, but StackEdit is still throwing this error.

Error 403: Update time is in the future, please check your clock!

It only seems to happen after uploading the design documents. I can't even save a file. I seem to be able to look at already saved documents, but I can't update them. I've followed the exact instructions on your CouchDB guide and it still won't let me sync.
My system clock is also fine.

I'm having this problem as well. Whenever I save any document to CouchDB I get the same error. I'm located in GMT+10, and I'm using NTP to set my clock.

Same error here when saving a new document to CouchDB. I am on CEST (Central European Summer Time =DST) and using ntp.

Same error for me (GMT+1).

I believe the issue on the Simleupps side, when I ran some JS code which output the date, it was 10 minutes or so off from NTP time.


Display name in notification after create/update/delete classroom/user operations

Following the conversation in #103, I've modified the popup to display the name of the user/classroom after the create/update/delete operations.
Test Screenshots:

Very cool to have this. Thanks.


Accesories no longer work after going to full version

[bug affects v3.3.1]
using the free version(3.3.1) accesories work fine
using the paid version(3.3.1) accesories will not spawn in the world cannot be rotated or positioned
paid version(3.3.0) works fine
files are placed in the same directory, both same files

@HugoVG
Thanks for feedback,
The issue has the same cause as #990 and Unity version update leads that problem.
#991 is the fix, so next version will work correctly.

I close this issue, since v3.4.0 is released to fix the issue.


docs(spec): Adds new Keyring protocol spec

This PR proposes a new specification section for a "Keyring protocol."
The purpose of this protocol is to enable easier key distribution for the
80% use case. Instead of being something intrinsic to the bindle protocol,
I believe having this as a separate protocol that any server (including existing
key servers) could implement will make it much more flexible.
If this spec change is accepted, I will implement it in a followup PR

Yeah I think the scope of this spec change is purely:

how do I get the server public key(s)

Other key distribution methods are specifically excluded from this for now, but would definitely be a welcome addition.
The other suggestion about docs is definitely valid, but not in scope for this PR IMO. We should open an issue and update the docs in another PR

@radu-matei and/or @fibonacci1729 could I get another review on this please? Since this is a spec change, I want to make sure at least one more maintainer reviews this


Allow to use custom text for close button

This should increase flexibility as "Skip" or some other keyword might be more appropriate than the default "Close" in some cases.
I've created a pull request: #22

closed by #22


query_resource_actions query is really slow

The following analysis shows that the query_resource_actions query does a sequential scan on the resourceaction table. As such, the query is really slow. This issue should improve the performance of this query.
inmanta=# EXPLAIN ANALYZE SELECT DISTINCT ra.* FROM resourceaction ra INNER JOIN resource r on  r.resource_version_id = ANY(ra.resource_version_ids) WHERE r.environment='f81be80b-8582-499f-b002-7cdd2f2df98a' AND resource_type='std::Package' AND agent='mgmt.ii.inmanta.com' AND r.resource_id_value='postgresql10-contrib' AND ra.action='deploy' ORDER BY started DESC, action_id DESC LIMIT 10;
                                                                                QUERY PLAN
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 Limit  (cost=70196.69..70196.97 rows=10 width=1341) (actual time=1598.449..1598.573 rows=10 loops=1)
   ->  Unique  (cost=70196.69..70197.02 rows=12 width=1341) (actual time=1598.447..1598.570 rows=10 loops=1)
         ->  Sort  (cost=70196.69..70196.72 rows=12 width=1341) (actual time=1598.446..1598.449 rows=10 loops=1)
               Sort Key: ra.started DESC, ra.action_id DESC, ra.finished, ra.messages, ra.status, ra.changes, ra.change, ra.environment, ra.version, ra.resource_version_ids
               Sort Method: quicksort  Memory: 61kB
               ->  Nested Loop  (cost=0.41..70196.48 rows=12 width=1341) (actual time=79.749..1598.384 rows=35 loops=1)
                     Join Filter: ((r.resource_version_id)::text = ANY ((ra.resource_version_ids)::text[]))
                     Rows Removed by Join Filter: 638475
                     ->  Index Scan using resource_environment_resource_id_value_index on resource r  (cost=0.41..459.90 rows=1 width=85) (actual time=0.065..0.317 rows=10 loops=1)
                           Index Cond: ((environment = 'f81be80b-8582-499f-b002-7cdd2f2df98a'::uuid) AND ((resource_id_value)::text = 'postgresql10-contrib'::text))
                           Filter: (((resource_type)::text = 'std::Package'::text) AND ((agent)::text = 'mgmt.ii.inmanta.com'::text))
                           Rows Removed by Filter: 226
                     ->  Seq Scan on resourceaction ra  (cost=0.00..68327.79 rows=62613 width=1341) (actual time=0.008..123.486 rows=63851 loops=10)
                           Filter: (action = 'deploy'::resourceaction_type)
                           Rows Removed by Filter: 23310
 Planning time: 0.433 ms
 Execution time: 1598.628 ms
(17 rows)

At first glance this seems to be caused by the new event mechanism. On this machine the impact is huge because there are many resources and many deploys so a very large resourceaction table.
There is actually a bug in this query. It causes pg to skip the index and it also might cause events leaking between environments with the same resource ids.
The query needs to also join on the environment.

The only way to make it faster than 800ms on this instance is normalizing the data. This can be done by creating a join table so the resource_version_ids is no longer an array. Initial tests using a view and materialized view show that a view drops it to 250ms and a materialized view to 75ms.
Tested with:
create view resource_action_join as select environment, action_id, unnest(resource_version_ids) as resource_version_id from resourceaction;

-- or

create materialized view resource_action_join as select environment, action_id, unnest(resource_version_ids) as resource_version_id from resourceaction;

SELECT DISTINCT ra.* FROM resourceaction ra
    INNER JOIN resource_action_join rj on ra.environment = rj.environment AND ra.action_id = rj.action_id
    INNER JOIN resource r on r.resource_version_id = rj.resource_version_id AND r.environment=ra.environment
    WHERE r.environment='f81be80b-8582-499f-b002-7cdd2f2df98a' AND resource_type='std::Package'
        AND agent='mgmt.ii.inmanta.com' AND r.resource_id_value='postgresql10-contrib' AND ra.action='deploy'
    ORDER BY started DESC, action_id DESC LIMIT 10;

This ticket should be handled in two or three stages:

Fix the bug
Introduce the join table and fix the query
Port other ra queries


UE 5.1 I Mac error: 'OnCreationFromPalette' marked 'override'

Hello,
I'm trying to compile the version on 5.1 but I get the following error:
UATHelper: Packaging (IOS): /Users/Clo/Develop/Develop/Hadem/Hadem-game/Plugins/UE4_TitanUMG-UE5/Source/TitanUMG/Public/TitanGoogleFontIcon.h:21:15: error: 'OnCreationFromPalette' marked 'override' but does not override any member functions
UATHelper: Packaging (IOS):         virtual void OnCreationFromPalette() override;

Fixed on latest update "On UE5 Branch" .
https://github.com/irajsb/UE4_TitanUMG/tree/UE5


Fill in blank quiz.

There is some things in "fill in blank" that needs to be done.
*The input field should be empty after submitting.
*You should be able to submit with enter.
*The input should be set to lower case.

 Fill in blank quiz


Errors from MEME text parser leads to pandas.errors.EmptyDataError: No columns to parse from file

I am trying to compare JASPER motifs to motifs found by TF-modisco-lite using the following command:
modisco report -i heart_left_ventricle_random_2000_all_modisco_results.h5 -o report_all_modisco/ -s report_all_modisco/ -m JASPAR2022_CORE_vertebrates_non-redundant_pfms_meme.txt

Relevant files:
report_all_modisco.tar.gz
JASPAR2022_CORE_vertebrates_non-redundant_pfms_meme.txt
heart_left_ventricle_random_2000_all_modisco_results.h5.gz
But I ran into the following error. I am attaching the files needed to reproduce this issue.
Errors from MEME text parser:
The PSPM of motif 1 has probabilities which don't sum to 1 on row 1.
The PSPM of motif 1 has probabilities which don't sum to 1 on row 1.
FATAL: Requested motif number 1  was not found in file '/tmp/296678579.1.noble-login.q/tmpuk0jiknv'.

Traceback (most recent call last):
  File "/net/noble/vol1/home/anupamaj/miniconda3/bin/modisco", line 147, in <module>
    modiscolite.report.report_motifs(args.h5py, args.output, img_path_suffix=args.suffix, meme_motif_db=args.meme_db,
  File "/net/noble/vol1/home/anupamaj/miniconda3/lib/python3.8/site-packages/modiscolite/report.py", line 263, in report_motifs
    tomtom_df = generate_tomtom_dataframe(modisco_h5py, meme_motif_db,
  File "/net/noble/vol1/home/anupamaj/miniconda3/lib/python3.8/site-packages/modiscolite/report.py", line 138, in generate_tomtom_dataframe
    r = fetch_tomtom_matches(ppm, cwm, motifs_db=meme_motif_db,
  File "/net/noble/vol1/home/anupamaj/miniconda3/lib/python3.8/site-packages/modiscolite/report.py", line 109, in fetch_tomtom_matches
    tomtom_results = pandas.read_csv(tomtom_fname, sep="\t", usecols=(1, 5))
  File "/net/noble/vol1/home/anupamaj/miniconda3/lib/python3.8/site-packages/pandas/io/parsers/readers.py", line 912, in read_csv
    return _read(filepath_or_buffer, kwds)
  File "/net/noble/vol1/home/anupamaj/miniconda3/lib/python3.8/site-packages/pandas/io/parsers/readers.py", line 577, in _read
    parser = TextFileReader(filepath_or_buffer, **kwds)
  File "/net/noble/vol1/home/anupamaj/miniconda3/lib/python3.8/site-packages/pandas/io/parsers/readers.py", line 1407, in __init__
    self._engine = self._make_engine(f, self.engine)
  File "/net/noble/vol1/home/anupamaj/miniconda3/lib/python3.8/site-packages/pandas/io/parsers/readers.py", line 1679, in _make_engine
    return mapping[engine](f, **self.options)
  File "/net/noble/vol1/home/anupamaj/miniconda3/lib/python3.8/site-packages/pandas/io/parsers/c_parser_wrapper.py", line 93, in __init__
    self._reader = parsers.TextReader(src, **kwds)
  File "pandas/_libs/parsers.pyx", line 557, in pandas._libs.parsers.TextReader.__cinit__
pandas.errors.EmptyDataError: No columns to parse from file

I dug a little deeper, and the error stems from the following command in the code:
tomtom -no-ssc -oc . --verbosity 1 -text -min-overlap 5 -mi 1 -dist pearson -evalue -thresh 10.0 /tmp/296678579.1.noble-login.q/tmp7exmpd9d JASPAR2022_CORE_vertebrates_non-redundant_pfms_meme.txt

from here: https://github.com/jmschrei/tfmodisco-lite/blob/main/modiscolite/report.py#L111
I went and opened the tmp file, and that seems to be all zeros (screenshot attached)

.

Hi @anupamajha1! Did you solve it? I am facing the same issue now


default_access_token config key is exlcuded

the config key default_access_token is excluded when injecting config. It should be added to this array to work.
https://github.com/schimpanz/facebook/blob/master/src/FacebookFactory.php#L57
It should not be required, but it should not be excluded either.

How would we go about fixing this? Maybe you could submit a PR?

Done in 49f1cf1e3983655923995e86beb764ed66853dcf


Add basic support for conditional skip/xfail

The .skip property is overwritten and the last SKIP directive wins (same is true for .xfail). You could make it a cell array, collect several SKIP expressions, and feval all of them later (possibly with cellfun). Finally, you skip if any (DOCTEST__result.skip).
Then it would be possible to use several SKIP directives, e. g., +SKIP_IF(x<1) +SKIP_IF(OCTAVE).

How about raising an error instead? I'm thinking it's perhaps better to be explicit about the way things are combined.

this look good to me (modulo some work on users passing arrays etc as @oheim points out).

What do you think?

test_xfail_if_multiple.m has inconsistent function name.

This looks pretty good to me!  I haven't carefully reviewed the new code but it seems to work.  Only thing I'm not clear about is how general code is allowed to be inside the directive (see above).


pull request for e2e test at 01/24/2017 13:26:07

:white_check_mark: Validation status: passed
For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


typedef with default param

Bug Report

TSLint version: 4.3.1
TypeScript version: 2.1.5
Running TSLint via: CLI  / Visual Studio

TypeScript code being linted
function foo(value = true) {
  // ...
}

Actual behavior

[tslint] expected parameter: 'value' to have a typedef (typedef)

Expected behavior
As the type of value is infered from the default param, I'd like tslint to consider it valid.

Having the same issue.

This issue isn't just with params. I see this as being a new option allow-assignment

this is basically a duplicate of #669.
also related: #813.


Add a way to get the individual summarized sentences as an array

Hi there,
Love the gem, using it on a project... got a request to expose the summaries we were generating in a bullet point format rather than paragraph, so I refactored slightly to expose those sentences directly as an array as well as a paragraph summary.
Let me know if there's any way you'd like this updated or changed

@McFreely Any chance to see this pull request accepted?


Cannot compile using latest esphome

Hi,
I’m trying to use but I cannot compile using latest esphome. Can you help me?
Regards

You need to add sensor: block and  binary_sensor: block

i also had to change the namespace from esphomelib to esphome; but haven't tested the compiled binary yet


Dyson Purifier Humidify Cool Formaldehyde (358K) not supported

I've recently got a new Purifier Humidify Cool Formaldehyde, it doesn't work out of the box with this integration.
I played around a little bit and discovered that it's due to the fact that the device device_type is 358K.
With the following hack, everything works great in HA.
def get_device(serial: str, credential: str, device_type: str):
    return DysonPurifierHumidifyCoolFormaldehyde(serial, credential, "358K")

I wanted to let you know.
Thanks for sharing this integration.

Thx @lucaquerella - can you let me know how the hack works (e.g. where to insert etc)? Again, thanks!

I'm having the same issue with device_type 438K (which is also not supported). Would love guidance on how to implement this hack.

Yeah same here, interestingly 438E paired fine, but 438K did not.

I think he inserted/changed it somewhere in /config/custom_components/dyson_local
But I cannot find the same code as written above. There is something similar in config_flow.py starting in Line 207:

I tried to change CONST_DEVICE_TYPE in const.py to 358K and 358E (the 358E was reported by my Homebridge instance, tried this value aswell), but both were not working. @lucaquerella it would be aswesome if you could share some more details where we can find this code :)

Everyone! I found a solution, buried in this thread:
https://github.com/shenxn/libdyson/pull/32#issuecomment-1399591550
@javemp wrote it, I followed it and now it's working:
to get this working:

fully uninstall existing integration and restart ha
reinstall the integration from hacs (do not restart ha yet) and modify your manifest.json file to change:

“requirements”: [“libdyson==0.8.11”]
to:
“requirements"<EMAIL_ADDRESS>

restart ha and install integration as per normal, you should now see purifier cool in the list of devices

huge thanks to @jezzab for his work

Everyone! I found a solution, buried in this thread: shenxn/libdyson#32 (comment) @javemp wrote it, I followed it and now it's working: to get this working:

fully uninstall existing integration and restart ha
reinstall the integration from hacs (do not restart ha yet) and modify your manifest.json file to change:
“requirements”: [“libdyson==0.8.11”]
to:
“requirements"<EMAIL_ADDRESS>restart ha and install integration as per normal, you should now see purifier cool in the list of devices

huge thanks to @jezzab for his work

Yes that hack works. But you don't need to uninstall and reinstall. You just need to change that line in manifest.json and restart HA.

I also have the Dyson Purifier Humidify Cool Formaldehyde (358K) and can't connect it with this change either.

Unfortunately this integration is no longer maintained, but I've created a new fork and am actively working on the new Formaldehyde models. Have a look at #185 for more information, and let me know if you have any questions.

Sorry for the late answer.
The new fork completely solve this and other issues. great job @dotvezz.


Adding the functionality for Seating Summary to update the data based up on the RSVP link

Upon clicking the RSVP link to update the confirmed seat count, the seating summary within the guest details will be automatically refreshed with the latest data.


Dockerfile added

@yogaeasy Please check out what @googlebot remarked above - should you have signed the CLA, let me know :)

@googlebot I signed it!


Add deprecation message

Signed-off-by: Alan Cha<EMAIL_ADDRESS>

@Alan-Cha Very good! We may need to publish a patch to npm also, to reflect this change.


whole-cube beam convolution

Adds a utility to convolve each image to a common resolution.  Tests are needed.

Coverage decreased (-0.5%) to 72.267% when pulling 4609f83478494b1c44926f8492cca62e9fd57332 on keflavich:convolve_to_beam into ebba89786b8f1556bc14f05b43b1cb2d03687e98 on radio-astro-tools:master.

This is the next step toward resolution matching cubes.  We still need to add spectral smoothing + regridding.
@astrofrog @low-sky @e-koch any thoughts on function names here?  We could do something like spatial_smooth and spectral_smooth.  Or it could be convolve_to_beam.  I should probably also implement a comparable tool for convolving regular SpectralCubes

Also, does anyone have ideas for correctness tests?  I can eyeball them and then we just put tests in & trust them, but maybe we should have some cubes where we re-fit a 2D Gaussian to the resulting images as part of the test?

convolve_to_beam sounds good to me
The correctness test sounds good - not sure if there is a better way

The latest commit adds spectral smoothing.  Tests are obviously critical for these changes

Coverage decreased (-1.02%) to 71.719% when pulling fd370db13ca98795dc19bf53a7a00da1b663fa81 on keflavich:convolve_to_beam into ebba89786b8f1556bc14f05b43b1cb2d03687e98 on radio-astro-tools:master.

Coverage decreased (-1.06%) to 71.678% when pulling 11154fa5b9873bad0aa86ceb1f57aad92abb34d3 on keflavich:convolve_to_beam into ebba89786b8f1556bc14f05b43b1cb2d03687e98 on radio-astro-tools:master.

Coverage decreased (-2.1%) to 70.627% when pulling dbd8b6ab07723254aacef2fa76ea0e7966ff3bd9 on keflavich:convolve_to_beam into ebba89786b8f1556bc14f05b43b1cb2d03687e98 on radio-astro-tools:master.

Coverage decreased (-2.1%) to 70.598% when pulling d7ccbadd4343eaa0ad94d77e83ffe0eeb814f106 on keflavich:convolve_to_beam into ebba89786b8f1556bc14f05b43b1cb2d03687e98 on radio-astro-tools:master.

Coverage decreased (-2.1%) to 70.598% when pulling d7ccbadd4343eaa0ad94d77e83ffe0eeb814f106 on keflavich:convolve_to_beam into ebba89786b8f1556bc14f05b43b1cb2d03687e98 on radio-astro-tools:master.

Coverage decreased (-2.1%) to 70.598% when pulling 60a8be4a47d1526f3d226d63a94f1424282e8ae1 on keflavich:convolve_to_beam into ebba89786b8f1556bc14f05b43b1cb2d03687e98 on radio-astro-tools:master.

Coverage decreased (-1.6%) to 71.145% when pulling 15939b9acd24a1b3645fe47aeb570f6bd9a62864 on keflavich:convolve_to_beam into ebba89786b8f1556bc14f05b43b1cb2d03687e98 on radio-astro-tools:master.

Coverage decreased (-1.6%) to 71.145% when pulling 15939b9acd24a1b3645fe47aeb570f6bd9a62864 on keflavich:convolve_to_beam into ebba89786b8f1556bc14f05b43b1cb2d03687e98 on radio-astro-tools:master.

Coverage decreased (-1.4%) to 71.316% when pulling 7b92facdb45d3e950d3be540f22f995886bdf063 on keflavich:convolve_to_beam into ebba89786b8f1556bc14f05b43b1cb2d03687e98 on radio-astro-tools:master.

Coverage decreased (-1.6%) to 71.18% when pulling 43e326555f66f61046e1790aaca4fa7cda5484cf on keflavich:convolve_to_beam into ebba89786b8f1556bc14f05b43b1cb2d03687e98 on radio-astro-tools:master.

Coverage increased (+0.4%) to 73.124% when pulling d0ecba0a202d9ff0281bde932e1d0e7bbeab7e90 on keflavich:convolve_to_beam into ebba89786b8f1556bc14f05b43b1cb2d03687e98 on radio-astro-tools:master.

Coverage increased (+0.4%) to 73.124% when pulling b285bd8f1a71c01c9e7def587c08c7875a48d03f on keflavich:convolve_to_beam into ebba89786b8f1556bc14f05b43b1cb2d03687e98 on radio-astro-tools:master.

There are now tests in place for each of the new functions.  They seem to work in practice too.  Comments & feedback are welcome.  I'll rebase this on https://github.com/radio-astro-tools/spectral-cube/pull/316 before merging.

Coverage increased (+0.3%) to 73.074% when pulling f7d011a579cd6ade3e6e958e851012f7b0426984 on keflavich:convolve_to_beam into ebba89786b8f1556bc14f05b43b1cb2d03687e98 on radio-astro-tools:master.

:+1:
Getting multiprocessing to work would be nice, but that can be done another time.

Coverage increased (+0.3%) to 73.068% when pulling e1cbd571dff6aad6ce92338e76955139de4ed4c0 on keflavich:convolve_to_beam into ebba89786b8f1556bc14f05b43b1cb2d03687e98 on radio-astro-tools:master.

The beam changes seem to have triggered a numpy 1.9 error.  I don't understand how that's possible.

I can't reproduce the np 1.9 error.

@astrofrog I could use some help here - any idea why numpy 1.9 is putting a nan where numpy 1.8 and 1.10 do not?

@keflavich - there were conda issues a few days ago and 1.9.0b1 got installed by mistake. I've restarted the builds.

@astrofrog thanks!  I had been seeing this stuff crop up all over the place, good to finally have an explanation!


telegraf.service - The plugin-driven server agent for reporting metric into I

I have an ER8-Pro on firmware v2.0.9-hotfix.2
I followed your installation instructions, however the service is failing:

I do see that telegraf is in /usr/bin, and all I did was input my influxdb url, username, and password into the telegraf.conf.

Whats your package version?
Check your logs with journalctl -u telegraf -f.

I have found an issue. It is fixed in the latest release. Please try that version.

Unfortunately this did not resolve this issue.

Here is my config, it's just the sample config with my influxdb credentials/server plugged in.

I resolved this issue. I had both the [[inputs.exec]] uncommented resulting in this error. commenting out the second inputs.exec and the latter resolved this issue. I apologize, I'm a very new to how telegraf works.

The second inputs.exec section should also work. It seems like a config error.
You can play with this command:
/usr/bin/telegraf --test --config /etc/telegraf/telegraf.conf --config-directory /etc/telegraf/telegraf.d --debug

You find the info about the commands here.


Allow auto detection of the language.

Hi @appleboy, setting in the defaultProps the hl prop to en, forces the language to english when the prop is not set. This doesn't allow reCaptcha to auto-detect the language and force non-english people to set a different language instead of leave it undefined.

@sergiop thanks.


[WC-1977] feat(combobox-web): add setting to choose selected items style

Pull request type

Refactoring (e.g. file rename, variable rename, etc.)

Description
Add a new setting to the combobox to choose how selected items are shown.

Should we keep the commented code?

yes. it is fine for now. if things remain the same until we go GA, then remove.


Find in Files does not search scene files

Godot version:
3.1
OS/device including version:
Windows 10
Issue description:
Find in files seems to only search within .gd files. If your code is in the .tscn file (i.e. a large majority of the code) then it does not find it.
Steps to reproduce:

Have some known text in a scene code and a gd file.
Use Find In Files.
You will not get any results for the text within the scene code.

btw, it would be really nice if you could perform a ctrl/shift/f without having to first open a code file. More a quality of life request than a bug (but you're finding in all files, why the need to have a file open?)
Thanks.

New Godot user here.... I would be interested in working on this issue, although I have a small question. Could you provide details on how to write code that would appear in a .tscn file?

Could you provide details on how to write code that would appear in a .tscn file?

This is done by creating a new script and making it built-in (instead of saving it to a .gd file).

Could you provide details on how to write code that would appear in a .tscn file?

This is done by creating a new script and making it built-in (instead of saving it to a .gd file).

Hello,

Create a blank node
Click on add script
In the dialog select 'built in script'

To be honest, it took me ages to figure out how to do it to tell you. This option is now off for me by default, so either it's on by default and I clicked the toggle, or it's off by default and I clicked the wrong toggle :)
The problem I see it, is the tscn file also has a lot of xml for the other parts of the scene, like properties, etc. so it will have to filter these out.
I'm actually now wondering whether having it built in is such a good idea, as all it saves is an extra file? I guess there must be a use case for it. VS, for example, fixes the project tree complexity by nesting the code behind file in a level below each top level 'form'...

This is actually a duplicate of #20692


(maint) Update parser test baseline generator to output ending newline.

The code to create the baseline files for the parser tests was not appending on
an ending newline.  This commit simply updates the generator code to append a
newline.

@hlindberg This corrects the issue you've noticed on a few previous PRs wrt newlines at the end of baseline files.

great, thanks


fix repr for VocalizationDataset

currently dumps all attributes for every Vocalization in voc_list
Quick fix would be to override __repr__
Might be worth figuring out why attrs doesn't come up with a good __repr__ though

closing since the Dataset class was removed


bitbucket pr trigger doesn't work w merge from forked repo to base repo

Please check the Execution Link of the Pipeline for the Website Draft URL. This is located in the Preview Step behind the Harness VPN and also is available in #hdh_alerts. E.g Website Draft URL: https://unique-id--harness-developer.netlify.app. Current Draft URL is: https://658336ae0888fb4aa506aaeb--harness-developer.netlify.app


Any Chance on a time frame for when we get a Blender 3.3 Exporter update?

Hello Team Asobo,
Do you have a time frame on when we might recieve a new exporter that can export Blender 3.3 and 3.4 models?
Supposedly there are better UVW tools in Blenders 3.3 and also 3.4 Beta.
Perhaps we could do a Beta release of a new exporter and start getting this running and testing it?
Bill
Lionheart Creations

Also interested!

Work has restarted - this issue can be closed please.


reStructuredText uses long token names for syntax highlighting

rst2html can generate HTML with short or long form class names for syntax highlighting. Pygments (via the pygmentize command) seems to generate short form by default without any way to switch this. This means most/any stylesheets for code provided with various themes won't work when using rST output. This can easily be fixed by providing the --syntax-highlight=short flag to rst2html.

This is a bug. Without this fix, we do not have syntax highlighting when using rST resources.

https://github.com/gohugoio/hugo/pull/5350


[GEARPUMP-295] Fix the failure of getting stalling tasks from clock s…

…ervice
Be sure to do all of the following to help us incorporate your contribution
quickly and easily:

[x] Make sure the commit message is formatted like:
[GEARPUMP-<Jira issue #>] Meaningful description of pull request
[x] Make sure tests pass via sbt clean test.
[x] Make sure old documentation affected by the pull request has been updated and new documentation added for new functionality.

Codecov Report

Merging #174 into master will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff           @@
##           master    #174   +/-   ##
======================================
  Coverage    71.6%   71.6%
======================================
  Files         191     191
  Lines        6086    6086
  Branches      527     527
======================================
  Hits         4358    4358
  Misses       1728    1728

Continue to review full report at Codecov.

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

Let's wait for 0.8.3 release.

@manuzhang

+1


Notification icon showing as phonegap on iphone 6+

Expected Behaviour
For all iPhone's I've tested except for iphone 6+, the notification icon appears as the application icon.
Actual Behaviour
However, on an iphone 6+, it shows as the phonegap icon. I've tested an iphone 5, 5S, and 6 and it shows correctly.
Reproduce Scenario (including but not limited to)
My config.xml includes the following related to icons, ios, and the plugin:
    <plugin name="phonegap-plugin-push" source="npm" spec="1.6.3">
        <param name="SENDER_ID" value="launch-money" />
    </plugin>
    <icon src="icon.png" />
    <icon platform="android" gap:qualifier="ldpi" src="res/icon/android/icon-36-ldpi.png" />
    <icon platform="android" gap:qualifier="mdpi" src="res/icon/android/icon-48-mdpi.png" />
    <icon platform="android" gap:qualifier="hdpi" src="res/icon/android/icon-72-hdpi.png" />
    <icon platform="android" gap:qualifier="xhdpi" src="res/icon/android/icon-96-xhdpi.png" />
    <platform name="ios">
        <!-- iOS 7.0 -->
        <!-- iPhone 6 / 6+ -->
        <icon height="180" src="res/icon/ios/icon-60-3x.png" width="180" />
        <!-- iPhone / iPod Touch  -->
        <icon height="60" src="res/icon/ios/icon-60.png" width="60" />
        <icon height="120" src="res/icon/ios/icon-60-2x.png" width="120" />
        <!-- Settings Icon -->
        <icon height="76" src="res/icon/ios/icon-76.png" width="76" />
        <icon height="152" src="res/icon/ios/icon-76-2x.png" width="152" />
        <!-- Spotlight Icon -->
        <icon height="40" src="res/icon/ios/icon-40.png" width="40" />
        <icon height="80" src="res/icon/ios/icon-40-2x.png" width="80" />
        <!-- iOS 6.1 -->
        <!-- iPhone / iPod Touch -->
        <icon height="57" src="res/icon/ios/icon-57.png" width="57" />
        <icon height="114" src="res/icon/ios/icon-57-2x.png" width="114" />
        <!-- iPad -->
        <icon height="72" src="res/icon/ios/icon-72.png" width="72" />
        <icon height="144" src="res/icon/ios/icon-72-2x.png" width="144" />
        <!-- iPhone Spotlight and Settings Icon -->
        <icon height="29" src="res/icon/ios/icon-29.png" width="29" />
        <icon height="58" src="res/icon/ios/icon-29-2x.png" width="58" />
        <!-- iPad Spotlight and Settings Icon -->
        <icon height="50" src="res/icon/ios/icon-50.png" width="50" />
        <icon height="100" src="res/icon/ios/icon-50-2x.png" width="100" />
        <!-- iPhone and iPod touch -->
        <splash height="480" src="res/screen/ios/screen-iphone-portrait.png" width="320" />
        <splash height="960" src="res/screen/ios/screen-iphone-portrait-2x.png" width="640" />
        <!-- iPhone 5 / iPod Touch (5th Generation) -->
        <splash height="1136" src="res/screen/ios/screen-iphone-portrait-568h-2x.png" width="640" />
        <splash height="640" src="res/screen/ios/screen-iphone-landscape-568h-2x.png" width="1136" />
        <!-- iPhone 6 -->
        <splash height="1334" src="res/screen/ios/screen-iphone-portrait-667h-2x.png" width="750" />
        <splash height="2208" src="res/screen/ios/screen-iphone-portrait-736h-3x.png" width="1242" />
        <splash height="1242" src="res/screen/ios/screen-iphone-landscape-736h-3x.png" width="2208" />
        <!-- iPad -->
        <splash height="1024" src="res/screen/ios/screen-ipad-portrait.png" width="768" />
        <splash height="768" src="res/screen/ios/screen-ipad-landscape.png" width="1024" />
        <!-- Retina iPad -->
        <splash height="2048" src="res/screen/ios/screen-ipad-retina-portrait.png" width="1536" />
        <splash height="1536" src="res/screen/ios/screen-ipad-retina-landscape.png" width="2048" />
    </platform>

Let me know if you need any other information.

It's worth noting that on a previous phonegap build, I had to copy the icon files to the root directory to get the upload to Apple to work. I haven't copied all the remaining files. Is it possible that the 180px icon isn't being utilized?

I didn't copy the 180 px icon to the root directory because there wasn't an error or warning.

@lavarith did you get this sorted out? On my iPhone 6+ it does show up with the correct icon but I'm not sure about going through PGB.

No I didn't. It only shows correctly on the apple watch (which I assume is showing the phone icon).

The same problem here...  in iphone6+ and cli-6.1.0 in phonegap build, phonegap icon is show

I am using this icons and splash screens in my config.xml, icons are displaying ok in all devices:
<!-- icons -->
        <icon src="res/theme/iOS/Resources/icons/Icon.png" width="57" height="57" />
        <icon src="res/theme/iOS/Resources/icons/Icon-72.png" width="72" height="72" />
        <icon<EMAIL_ADDRESS>width="114" height="114" />
        <icon<EMAIL_ADDRESS>width="144" height="144" />
        <icon src="res/theme/iOS/Resources/icons/Icon-76.png" width="76" height="76"/>
        <icon src="res/theme/iOS/Resources/icons/Icon-120.png" width="120" height="120"/>
        <icon src="res/theme/iOS/Resources/icons/Icon-152.png" width="152" height="152"/>
        <icon<EMAIL_ADDRESS>width="180" height="180" />
        <icon src="res/theme/iOS/Resources/icons/Icon-60.png" width="60" height="60" />
        <icon src="res/theme/iOS/Resources/icons/Icon-120.png" width="120" height="120" />
        <icon src="res/theme/iOS/Resources/icons/Icon-76.png" width="76" height="76" />
        <icon src="res/theme/iOS/Resources/icons/Icon-152.png" width="152" height="152" />
        <icon src="res/theme/iOS/Resources/icons/Icon-29.png" width="29" height="29" />
        <icon src="res/theme/iOS/Resources/icons/Icon-58.png" width="58" height="58" />
        <icon src="res/theme/iOS/Resources/icons/Icon-40.png" width="40" height="40" />
        <icon src="res/theme/iOS/Resources/icons/Icon-80.png" width="80" height="80" />
        <!-- Splash -->
        <splash src="res/theme/iOS/Resources/splash/Default-iphone.png" platform="ios" width="320" height="480" />
        <splash<EMAIL_ADDRESS>platform="ios" width="640" height="960" />
        <splash<EMAIL_ADDRESS>platform="ios" width="640" height="1136" />
        <splash<EMAIL_ADDRESS>platform="ios" width="750" height="1334" />
        <splash<EMAIL_ADDRESS>platform="ios" width="1242" height="2208" />
        <splash src="res/theme/iOS/Resources/splash/Default-Portrait-ipad_768x1024.png" platform="ios" width="768" height="1024" />
        <splash<EMAIL_ADDRESS>platform="ios" width="1536" height="2048" />
        <splash<EMAIL_ADDRESS>platform="ios" width="2208" height="1242" />
        <splash src="res/theme/iOS/Resources/splash/Default-Landscape-ipad_1024x748.png" platform="ios" width="1024" height="768" />
        <splash<EMAIL_ADDRESS>platform="ios" width="2048" height="1536" />

vtellez are you using  cli-6.1.0 version?

Yes, I am using cli-6.1.0 version

Thanks I will try to use the exact names for files like you... Are you using version 1.7.1 of this plugin?

Yes, the last version of this plugin. This is my config.xml declaration:
  <gap:plugin name="phonegap-plugin-push" source="npm">
        <param name="SENDER_ID" value="xxxx" />
    </gap:plugin>

Thanks again... I think that the problem is here

In my config.xml file is not present this icon... I will try if this solve the problem

@oscarabilleira did you ever find the fix for this issue?

@sergioaok The issue for us was a missing 86 X 87 icon. I think it was the<EMAIL_ADDRESS>Hopefully, this helps

@dagmawim thank you so much! You are amazing!

Did you ever get PhoneGap Build to pick up the 180x180 icon for IOS (AppIcon60x60@3x)?
Using PGB with CLI 6.5.0, that icon always shows up as ALL BLACK in the .ipa file that PGB generates, even though it shows correctly (as a small map) in the www/res/icon/ios  folder

In my config.xml I have
 <icon src="www/res/icon/ios/icon-180.png"    width="180" height="180" />
All my other 19 IOS icons show up correctly.
To see the contents of the .ipa file, download it to your machine, change ipa to zip, and unzip it.  The build icons are under /Payload/appname.app/:

the PGB team has asked for people with issues regarding phonegap build please start an issue on the support forum: https://forums.adobe.com/community/phonegap/build
please include an app id of an app that can replicate this issue.


DOC: not everyone is familiar with the concept of PATH, link or add more information about it

Docker Machine is supported on Windows, OSX, and Linux. To install Docker Machine, download the appropriate binary for your OS and architecture to the correct place in your PATH:

The documentation asks users to download the binary to their PATH, however, lots of users won't be familiar with their path. I would strongly suggest to link to some documentation about path, especially for Windows users out there. Another option is to suggest some common paths based on the os, /usr/local/bin for instance for Mac and Linux.

https://docs.docker.com/machine/

Yeah I definitely want curl + chmod example(s) to copy-paste for OSX/Linux install.  Windows is a little trickier but I'm sure we can figure something out.

Guess I should have started with #dibs

There definitely needs to be more documentation for Windows.

The executable download isn't an installer - it's an executable. Windows users are used to installers, which put things where they need to be with the right names and adjust PATHs accordingly so things "just work".
The executable has the name docker-machine_windows-amd64.exe but the documentation shows people just typing docker-machine at the command prompt.
It should be noted that docker-machine stores stuff in your user directory in a folder called .docker. For example, my user folder is C:\Users\Ed and docker-machine's stuff lands in C:\Users\Ed\.docker.

Really, though, step one is to build an installer. ;-)

Nice points @znmeb @mattetti .  I am working on some slightly better documentation on the Windows side in particular for this next release.

@nathanleclaire any chance of either a Windows installer for docker-machine or boot2docker supporting Hyper-V instead of VirtualBox? Either one would work for me.

Unfortunately I don't have a windows machine to test all the cases but splitting the installation docs by OS makes a lot of sense to me.

@ipedrazas I have a dual-booted laptop (Windows 8.1 and Fedora Linux 22 Alpha). I'm testing heavily all ways of running Docker containers with Windows Client Hyper-V. So far I have Docker Machine and Fedora Project Atomic running and hope to have Vagrant running in the near future.
This is a bake-off - most convenient to an end user wins. ;-) That means working documentation and as few stop-points / places a beginner can screw up and get confused as possible.

P.S.: Vagrant is a long shot in this race because its config file is Ruby code! That's about as end-user-unfriendly as it gets! ;-)

any chance of either a Windows installer for docker-machine or boot2docker supporting Hyper-V instead of VirtualBox? Either one would work for me.

Tentatively I think the plan here is to offer a Windows installer for docker-machine, but I'm not sure when that would come down the pipe.  Until then I intend to provide some instructions to make installing easier via msysgit.

P.S.: Vagrant is a long shot in this race because its config file is Ruby code! That's about as end-user-unfriendly as it gets! ;-)

Lol - Vagrant has very good docs and is a pretty mature tool though - at any rate I'd like to hear your thoughts when you're finished so we can improve :)

@nathanleclaire Vagrant is a tool for developers, not end-users. It depends heavily on Ruby devops tools like Puppet, Chef, etc. And it is heavily VirtualBox-centric. If you don't know Ruby well enough to read a Vagrantfile you're going to flounder trying to do anything except read instructions from a blog post and follow them. Then again, so is Docker. ;-)

In general I think a working understanding of PATH is pretty essential to running on the command line so I think it's a little out of scope for Machine docs to cover.  We should be offering Mac and Windows installers soon, too.


[CRYPTO-10] Support multiple destinations

Related API PR: 2420
Fireblocks allows for multiple destinations to be sent via the destinations parameter.
From the API-side, destinations will be used in order to support batch disbursements for UTXO transactions.

Oops, need to update lib/version.rb


Requires tutorials or Instructions on how to Use AlgorandUnitySDKver2 in Unity

I will certainly do it, currently we are still in Alpha a and I am starting to develop everything.

Alright. I'm developing a web 3.0 game demo using this plugin. Looking forward to working with your code Dev.


Add a section about how to integrate custom extensions into detekt

See #1395

Codecov Report

Merging #1403 into master will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master    #1403   +/-   ##
=========================================
  Coverage     74.14%   74.14%
  Complexity     1930     1930
=========================================
  Files           324      324
  Lines          5102     5102
  Branches        944      944
=========================================
  Hits           3783     3783
  Misses          770      770
  Partials        549      549

Continue to review full report at Codecov.

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


chore: bdd-gh-1585701958 to 0.0.1

chore: Promote bdd-gh-1585701958 to version 0.0.1

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approvers:
If they are not already assigned, you can assign the PR to them by writing /assign  in a comment when ready.
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment


chore: publish v1.0.0-dev.5

maybe upgrade realtime as well?

I intentionally don't want to include the new realtime update on this release so that those who want to use the old version of realtime can use this version and take their time to update.
Will release v1.0.0-dev.6 of supabase-flutter that depends on supabase-dart 1.0.0-dev.5, which includes the realtime updates as soon as supabaes-dart 1.0.0-dev.5 is released!


Support a Matrix Bridge

Looks like there is support for different chat systems, such as Slack. Matrix server is a privacy focused decentralized chat and VOIP... I would request creating a bridge for Matrix. It too, has a Slack bridge and may be something to leverage with this system.
https://matrix.org/

Interesting, we could use https://pkg.go.dev/maunium.net/go/mautrix

This seems like a good idea but I don't use Matrix myself and so it would be hard for me to test out whatever I develop. I'll ask active devzat users if they have any experience with Matrix.
Also, would a Matrix Devzat plug-in be a better way to accomplish this?

I personally don't use Matrix but I feel it would make total sense to add a Matrix bridge. As one of us could host the Matrix server, testing would be rather easy.

I am running a Matrix Server on matrix.pptie.de.
I can give you admin if you want or other help...
I want to work on it but may not have the time...


Error in version 1.09

It doesn't work in version 1.09. Please update.

Any news about update?

Updated it.


Osmdroid using cleartext http. Not allowed with Android 9

With Android 9, cleartext http is not allowed. HttpS is required.
If compile and targetting Android 9 ( targetSdkVersion 28), Osmdroid will NOT load any tile when running on Android 9. No matter the tile provider.
While not fixed a workaround is to instrument the Manifest.
<application
android:usesCleartextTraffic="true"
Issue Type
[ ] Question
[ X] Bug
[ ] Improvement
[ ] Build system related
[ ] Performance
[ ] Documentation
Environment
targetSdkVersion 28 AND running on Android 9.
If it's a bug, version(s) of android this affects:
9.0 only.
Version of osmdroid the issue relates to:
all

@scoutant "No matter the tile provider"? What about "USGS_TOPO" (for USA maps): the tile URLs are already in httpS.
Similar to #1287. Working on it: trying to update the old http tile URLs to httpS in TileSourceFactory.

@scoutant You should also see MAPNIK tiles, provided that you set a proper user agent (cf. #1288).
I've just PR'ed #1291: please have a go with this fix.
Btw I added an entry in the FAQ about this Android 9+ behavior. It's less permissive than your initial code suggestion, but I couldn't find time to test it.

Solved by #1291


Make all iframes responsive

Add bootstrap's "embed-responsive" class to all iframes by default. This prevents iframes like youtube video embeds not to extend out of the viewport on small screens.

Hi David,
"embed-responsive-4by3" will make all YouTube embedded videos 4:3 aspect ratio :(
http://getbootstrap.com/components/#responsive-embed

You're right. I am going to remove this and let users decide on what they want to use on their own.


OIDC scopes groups not working

Discussed in https://github.com/akuity/kargo/discussions/3008

Originally posted by creeram November 27, 2024
I'm trying to use groups for the admin permissions.

api:
  enabled: true
  replicas: 1
  host: kargo.example.com
  tls:
    enabled: false
  ingress:
    enabled: true
    ingressClassName: nginx
    tls:
      enabled: false

  adminAccount:
    enabled: false
  oidc:
    enabled: true
    issuerURL: https://keycloak.example/realms/{realmname}
    clientID: kargo
    additionalScopes: []
    admins:
      claims:
        email:
        -<EMAIL_ADDRESS>        groups:
        - kargo-admin

the api.oidc.claims.email works as an admin user. But the groups are not working.
kargo-admin is a i tried creating groups on Keycloak and Google Group with users added in the group for testing but could not get the admin permissions.
am I doing something wrong here?

Answered in #3008.


[BUG] False positive in defer including check for named error return

Describe the bug
False positive with defer including check for named error return.
To Reproduce
func _(ctx context.Context) (retErr error) {
	ctx, span := otel.Tracer("foo").Start(ctx, "bar")
    defer func() {
		if retErr != nil {
			span.SetStatus(codes.Error, retErr.Error())
        	span.RecordError(retErr)
		}
		span.End() // always ended
	}()

    if err := subTask(ctx); err != nil {
        return err
    }
}

Expected behavior
No spancheck lint on the ended span, since it's always ended.
Additional context
This is a somewhat common pattern that I've seen used to always capture the error from any returned error in a function, that seems to trip up spancheck - it should be able to tell that span.End() is unconditionally ended, despite not being the first statement in the defer?

I feared the day this bug report would arrive... I've hit this myself, honestly, and also like that approach of using named errors to set the status and error on the span. I gave a fix 30m a bit ago, but haven't properly fixed it. I have a long flight coming up that might be an ideal time...

Just wanted to note that this seems to been coming up if there's any conditionals in the defer, just in case that helps.

@stefanvanburen @chancez I think this is fixed now. Added a test case here well showing it not reporting missing calls: https://github.com/jjti/go-spancheck/compare/v0.6.3...v0.6.4
It'll take a bit before it's merged and released in golangci-lint (assuming that's how you're using the linter). Please report here and re-open this issue if it persists after picking up this latest version tho, v0.6.4


copr: use manually written json path parser

Signed-off-by: YangKeao<EMAIL_ADDRESS>What is changed and how it works?
Issue Number: Close #13316
What's Changed:
Use a manually written json path parser to parse the path.
Check List
Tests

[x] Unit test
Integration test
Manual test (add detailed scripts or steps below)
No code

Release note
Fix the issue that the json path format is incompatible with MySQL

PTAL @xiongjiwei

lint failed

/cc @wshwsh12 @gengliqi

PTAL @wshwsh12 @gengliqi

/cc @xhebox

@xhebox PTAL

/merge

@wshwsh12 @gengliqi PTAL

One comment just for coding style: Use /// instead of // to document symbols(like functions or variables in struct/enum) and capitalize the first letter in comments. (Most codes I have seen obey this rule)

@gengliqi Good! Fixed :heart:

@gengliqi Thanks for pointing out :heart: . Fixed :man_facepalming:

/merge


Potential Path Manipulation in file certificate_generator/app/routes.py

While triaging your project, our bug fixing tool generated the following message -
In file: routes.py, there is a method that is vulnerable to path manipulation attack. By modifying file paths, an attacker can acquire sensitive information from different resources.
--- certificate_generator/app/routes.py

+++ certificate_generator/app/routes.py

@@ -48,5 +48,20 @@

     if request.method == "GET":

         filename = request.args.get("filename")

         filepath = os.path.join("static/certificates/generated", filename)

+        '''

+        ***************** OpenRefactory Warning *****************

+        Possible Path manipulation attack!

+        Path:

+        	File: routes.py, Line: 49

+        		filename = request.args.get("filename")

+        		Variable filename is assigned a tainted value from an external source.

+        	File: routes.py, Line: 50

+        		filepath = os.path.join("static/certificates/generated", filename)

+        		Variable filepath is assigned a tainted value.

+        	File: routes.py, Line: 51

+        		return send_file(filepath, as_attachment=True, cache_timeout=0,

+        		                         attachment_filename=filename)

+        		Tainted information is used in a sink.

+        '''

         return send_file(filepath, as_attachment=True, cache_timeout=0,

                          attachment_filename=filename)

Here filename is taken from request parameters and joined with a specific directory to form a path. Then the file corresponding to that path is sent back as response. Since filename is not sanitized, it can be assinged values containing ../ to cause a path traversal attack.
For example, if current directory is /path/to/app then the following request can be sent to get the contents of /etc/passwd:
http://localhost:5000/download_certificate?filename=%2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2f%2e%2e%2fetc%2fpasswd

The payload is url encoded version of ../../../../../../etc/passwd.
CLA Requirements:
This section is only relevant if your project requires contributors to sign a Contributor License Agreement (CLA) for external contributions.
All contributed commits are already automatically signed off.
The meaning of a signoff depends on the project, but it typically certifies that committer has the rights to submit this work under the same license and agrees to a Developer Certificate of Origin (see https://developercertificate.org/ for more information).

Git Commit SignOff documentation

Sponsorship and Support:
This work is done by the security researchers from OpenRefactory and is supported by the Open Source Security Foundation (OpenSSF): Project Alpha-Omega. Alpha-Omega is a project partnering with open source software project maintainers to systematically find new, as-yet-undiscovered vulnerabilities in open source code - and get them fixed - to improve global software supply chain security.
The bug is found by running the iCR tool by OpenRefactory, Inc. and then manually triaging the results.

Hi, can I work on this issue?

Hi @seowwj
Sure. Please feel free to do so if you're so inclined.


Add basic installer.

I'd like to add an installer modeled after the one used in odb/shunt. Not sure about the adding to path though, as this isn't technically an executable. If done, I'm thinking it could be sourced with:
source "$(which shml.sh)"

Feedback welcome.

Check gh-pages. I wrote a 1-liner installer

+1

Added in 1.0.0 docs


HPX fails to build on macOS

HPX ee38b8bd657607a7e52587fcf3df6d06fb4a3480 fails to build on macOS 10.14.6, AppleClang 10.0.1
Error:
+ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -arch x86_64 -fmessage-length=195 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -fcolor-diagnostics -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-return-type -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-float-conversion -Wno-non-literal-null-conversion -Wno-objc-literal-conversion -Wno-shorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -DCMAKE_INTDIR=\"Debug\" -DDEBUG -D_DEBUG -DHPX_MODULE_EXPORTS -D_GNU_SOURCE -DBOOST_ALL_NO_LIB -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -mmacosx-version-min=10.14 -g -Wno-sign-conversion -Wno-infinite-recursion -Wno-move -Wno-comma -Wno-block-capture-autoreleasing -Wno-strict-prototypes -Wno-range-loop-analysis -Wno-semicolon-before-method-body -I${REPOS}/hpx/cmake-build-debug/lib/Debug/include -I/usr/local/Cellar/hwloc/2.0.4/include -I${REPOS}/hpx/cmake-build-debug -I${REPOS}/hpx/libs/logging/include -I${REPOS}/hpx/cmake-build-debug/libs/logging/include -I${REPOS}/hpx/libs/logging/include_compatibility -I${REPOS}/hpx/libs/assertion/include -I${REPOS}/hpx/cmake-build-debug/libs/assertion/include -I${REPOS}/hpx/libs/assertion/include_compatibility -I${REPOS}/hpx/libs/config/include -I${REPOS}/hpx/cmake-build-debug/libs/config/include -I${REPOS}/hpx/libs/preprocessor/include -I${REPOS}/hpx/cmake-build-debug/libs/preprocessor/include -I${REPOS}/hpx/libs/preprocessor/include_compatibility -I${REPOS}/hpx/libs/filesystem/include -I${REPOS}/hpx/cmake-build-debug/libs/filesystem/include -isystem /usr/local/include -I${REPOS}/hpx/cmake-build-debug/libs/logging/HPX.build/Debug/hpx_logging.build/DerivedSources-normal/x86_64 -I${REPOS}/hpx/cmake-build-debug/libs/logging/HPX.build/Debug/hpx_logging.build/DerivedSources/x86_64 -I${REPOS}/hpx/cmake-build-debug/libs/logging/HPX.build/Debug/hpx_logging.build/DerivedSources -Wmost -Wno-four-char-constants -Wno-unknown-pragmas -F${REPOS}/hpx/cmake-build-debug/lib/Debug -fPIC -std=c++17 -pthread -ftemplate-depth=256 -Wall -Wextra -Wno-unused-local-typedefs -Wno-strict-aliasing -Wno-sign-promo -Wno-attributes -Wno-cast-align -Wno-unused-parameter -Wformat=2 -Wno-format-nonliteral -Winit-self -Wdouble-promotion -Wcast-qual -Wcast-align -Werror=parentheses -Werror=reorder -Werror=return-type -Werror=sequence-point -Werror=uninitialized -Werror=format -Werror=missing-braces -Werror=sign-compare -fdiagnostics-show-option -Werror=vla -MMD -MT dependencies -MF ${REPOS}/hpx/cmake-build-debug/libs/logging/HPX.build/Debug/hpx_logging.build/Objects-normal/x86_64/logging.d --serialize-diagnostics ${REPOS}/hpx/cmake-build-debug/libs/logging/HPX.build/Debug/hpx_logging.build/Objects-normal/x86_64/logging.dia -c ${REPOS}/hpx/libs/logging/src/logging.cpp -o ${REPOS}/hpx/cmake-build-debug/libs/logging/HPX.build/Debug/hpx_logging.build/Objects-normal/x86_64/logging.o
In file included from ${REPOS}/hpx/libs/logging/src/logging.cpp:11:
In file included from ${REPOS}/hpx/libs/logging/include/hpx/logging.hpp:17:
In file included from ${REPOS}/hpx/libs/logging/include/hpx/logging/logging.hpp:21:
In file included from ${REPOS}/hpx/libs/logging/include/hpx/logging/detail/logger.hpp:21:
In file included from ${REPOS}/hpx/libs/logging/include/hpx/logging/detail/cache_before_init.hpp:22:
In file included from ${REPOS}/hpx/libs/logging/include/hpx/logging/writer/named_write.hpp:29:
${REPOS}/hpx/libs/logging/include/hpx/logging/format/formatter/high_precision_time.hpp:34:10: fatal error: 'hpx/lcos/local/spinlock.hpp' file not found
#include <hpx/lcos/local/spinlock.hpp>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Full log:
build-fail.txt

Some of the modules have source files that depend on #includes that have not been modularized yet. For the time being, we should add the main hpx directory through a target_include_directories(module PRIVATE ...) to those modules (at least).

The reason this didn't come up before is that the spinlock is only used on non-Linux/BSD/Windows platforms... @hkaiser this dependency is not going to get any better once there is an lcos module with the spinlock. I'd rather give boost::spinlock a try again. But then it looks like (from my quick googling) that localtime_r should also be available on MacOS so maybe it's just a question of adding || defined(__APPLE__) here: https://github.com/STEllAR-GROUP/hpx/blob/ee38b8bd657607a7e52587fcf3df6d06fb4a3480/libs/logging/include/hpx/logging/format/formatter/high_precision_time.hpp#L98-L99. @hkaiser do you remember if it was a conscious decision to leave MacOS to the fallback branch?

do you remember if it was a conscious decision to leave MacOS to the fallback branch?

I don't, sorry. @parsa could you try, please?

Leaving this open until we've checked if the other fixes work as well.

@msimberg went back to ee38b8bd657607a7e52587fcf3df6d06fb4a3480 and tried adding __APPLE__:
diff --git a/libs/logging/include/hpx/logging/format/formatter/high_precision_time.hpp b/libs/logging/include/hpx/logging/format/formatter/high_precision_time.hpp
index c8c91424111..baa3ec5842c 100644
--- a/libs/logging/include/hpx/logging/format/formatter/high_precision_time.hpp
+++ b/libs/logging/include/hpx/logging/format/formatter/high_precision_time.hpp
@@ -95,7 +95,7 @@ For instance, you might use @ref hpx::util::logging::optimize::cache_string_one_
         {
             std::time_t tt = std::chrono::system_clock::to_time_t(val);

-#if defined(__linux) || defined(linux) || defined(__linux__) ||                \
+#if defined(__linux) || defined(linux) || defined(__linux__) || defined(__APPLE__) ||                \
     defined(__FreeBSD__)
             std::tm local_tm;
             localtime_r(&tt, &local_tm);

Still get the same error:
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -arch x86_64 -fmessage-length=195 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -fcolor-diagnostics -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-return-type -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-float-conversion -Wno-non-literal-null-conversion -Wno-objc-literal-conversion -Wno-shorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -DCMAKE_INTDIR=\"Debug\" -DDEBUG -D_DEBUG -DHPX_MODULE_EXPORTS -D_GNU_SOURCE -DBOOST_ALL_NO_LIB -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -mmacosx-version-min=10.14 -g -Wno-sign-conversion -Wno-infinite-recursion -Wno-move -Wno-comma -Wno-block-capture-autoreleasing -Wno-strict-prototypes -Wno-range-loop-analysis -Wno-semicolon-before-method-body -I${REPOS}/Repositories/hpx/cmake-build-debug/lib/Debug/include -I/usr/local/Cellar/hwloc/2.0.4/include -I${REPOS}/Repositories/hpx/cmake-build-debug -I${REPOS}/Repositories/hpx/libs/logging/include -I${REPOS}/Repositories/hpx/cmake-build-debug/libs/logging/include -I${REPOS}/Repositories/hpx/libs/logging/include_compatibility -I${REPOS}/Repositories/hpx/libs/assertion/include -I${REPOS}/Repositories/hpx/cmake-build-debug/libs/assertion/include -I${REPOS}/Repositories/hpx/libs/assertion/include_compatibility -I${REPOS}/Repositories/hpx/libs/config/include -I${REPOS}/Repositories/hpx/cmake-build-debug/libs/config/include -I${REPOS}/Repositories/hpx/libs/preprocessor/include -I${REPOS}/Repositories/hpx/cmake-build-debug/libs/preprocessor/include -I${REPOS}/Repositories/hpx/libs/preprocessor/include_compatibility -I${REPOS}/Repositories/hpx/libs/filesystem/include -I${REPOS}/Repositories/hpx/cmake-build-debug/libs/filesystem/include -isystem /usr/local/include -I${REPOS}/Repositories/hpx/cmake-build-debug/libs/logging/HPX.build/Debug/hpx_logging.build/DerivedSources-normal/x86_64 -I${REPOS}/Repositories/hpx/cmake-build-debug/libs/logging/HPX.build/Debug/hpx_logging.build/DerivedSources/x86_64 -I${REPOS}/Repositories/hpx/cmake-build-debug/libs/logging/HPX.build/Debug/hpx_logging.build/DerivedSources -Wmost -Wno-four-char-constants -Wno-unknown-pragmas -F${REPOS}/Repositories/hpx/cmake-build-debug/lib/Debug -fPIC -std=c++17 -pthread -ftemplate-depth=256 -Wall -Wextra -Wno-unused-local-typedefs -Wno-strict-aliasing -Wno-sign-promo -Wno-attributes -Wno-cast-align -Wno-unused-parameter -Wformat=2 -Wno-format-nonliteral -Winit-self -Wdouble-promotion -Wcast-qual -Wcast-align -Werror=parentheses -Werror=reorder -Werror=return-type -Werror=sequence-point -Werror=uninitialized -Werror=format -Werror=missing-braces -Werror=sign-compare -fdiagnostics-show-option -Werror=vla -MMD -MT dependencies -MF ${REPOS}/Repositories/hpx/cmake-build-debug/libs/logging/HPX.build/Debug/hpx_logging.build/Objects-normal/x86_64/logging.d --serialize-diagnostics ${REPOS}/Repositories/hpx/cmake-build-debug/libs/logging/HPX.build/Debug/hpx_logging.build/Objects-normal/x86_64/logging.dia -c ${REPOS}/Repositories/hpx/libs/logging/src/logging.cpp -o ${REPOS}/Repositories/hpx/cmake-build-debug/libs/logging/HPX.build/Debug/hpx_logging.build/Objects-normal/x86_64/logging.o
In file included from ${REPOS}/Repositories/hpx/libs/logging/src/logging.cpp:11:
In file included from ${REPOS}/Repositories/hpx/libs/logging/include/hpx/logging.hpp:17:
In file included from ${REPOS}/Repositories/hpx/libs/logging/include/hpx/logging/logging.hpp:21:
In file included from ${REPOS}/Repositories/hpx/libs/logging/include/hpx/logging/detail/logger.hpp:21:
In file included from ${REPOS}/Repositories/hpx/libs/logging/include/hpx/logging/detail/cache_before_init.hpp:22:
In file included from ${REPOS}/Repositories/hpx/libs/logging/include/hpx/logging/writer/named_write.hpp:29:
${REPOS}/Repositories/hpx/libs/logging/include/hpx/logging/format/formatter/high_precision_time.hpp:34:10: fatal error: 'hpx/lcos/local/spinlock.hpp' file not found
#include <hpx/lcos/local/spinlock.hpp>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Also 1adc78ddcad8cf3feb451664a93bbfeb9a48bf82 doesn't work either. It complains about a different header though:
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x c++ -arch x86_64 -fmessage-length=195 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -fcolor-diagnostics -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wno-return-type -Wno-non-virtual-dtor -Wno-overloaded-virtual -Wno-exit-time-destructors -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wno-unused-variable -Wunused-value -Wno-empty-body -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wno-constant-conversion -Wno-int-conversion -Wno-bool-conversion -Wno-enum-conversion -Wno-float-conversion -Wno-non-literal-null-conversion -Wno-objc-literal-conversion -Wno-shorten-64-to-32 -Wno-newline-eof -Wno-c++11-extensions -DCMAKE_INTDIR=\"Debug\" -DDEBUG -D_DEBUG -DHPX_MODULE_EXPORTS -D_GNU_SOURCE -DBOOST_ALL_NO_LIB -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -mmacosx-version-min=10.14 -g -Wno-sign-conversion -Wno-infinite-recursion -Wno-move -Wno-comma -Wno-block-capture-autoreleasing -Wno-strict-prototypes -Wno-range-loop-analysis -Wno-semicolon-before-method-body -I${REPOS}/Repositories/hpx/cmake-build-debug/lib/Debug/include -I/usr/local/Cellar/hwloc/2.0.4/include -I${REPOS}/Repositories/hpx/cmake-build-debug -I${REPOS}/Repositories/hpx/libs/logging/include -I${REPOS}/Repositories/hpx/cmake-build-debug/libs/logging/include -I${REPOS}/Repositories/hpx/libs/logging/include_compatibility -I${REPOS}/Repositories/hpx/libs/logging/../.. -I${REPOS}/Repositories/hpx/libs/assertion/include -I${REPOS}/Repositories/hpx/cmake-build-debug/libs/assertion/include -I${REPOS}/Repositories/hpx/libs/assertion/include_compatibility -I${REPOS}/Repositories/hpx/libs/config/include -I${REPOS}/Repositories/hpx/cmake-build-debug/libs/config/include -I${REPOS}/Repositories/hpx/libs/preprocessor/include -I${REPOS}/Repositories/hpx/cmake-build-debug/libs/preprocessor/include -I${REPOS}/Repositories/hpx/libs/preprocessor/include_compatibility -I${REPOS}/Repositories/hpx/libs/filesystem/include -I${REPOS}/Repositories/hpx/cmake-build-debug/libs/filesystem/include -isystem /usr/local/include -I${REPOS}/Repositories/hpx/cmake-build-debug/libs/logging/HPX.build/Debug/hpx_logging.build/DerivedSources-normal/x86_64 -I${REPOS}/Repositories/hpx/cmake-build-debug/libs/logging/HPX.build/Debug/hpx_logging.build/DerivedSources/x86_64 -I${REPOS}/Repositories/hpx/cmake-build-debug/libs/logging/HPX.build/Debug/hpx_logging.build/DerivedSources -Wmost -Wno-four-char-constants -Wno-unknown-pragmas -F${REPOS}/Repositories/hpx/cmake-build-debug/lib/Debug -fPIC -std=c++17 -pthread -ftemplate-depth=256 -Wall -Wextra -Wno-unused-local-typedefs -Wno-strict-aliasing -Wno-sign-promo -Wno-attributes -Wno-cast-align -Wno-unused-parameter -Wformat=2 -Wno-format-nonliteral -Winit-self -Wdouble-promotion -Wcast-qual -Wcast-align -Werror=parentheses -Werror=reorder -Werror=return-type -Werror=sequence-point -Werror=uninitialized -Werror=format -Werror=missing-braces -Werror=sign-compare -fdiagnostics-show-option -Werror=vla -MMD -MT dependencies -MF ${REPOS}/Repositories/hpx/cmake-build-debug/libs/logging/HPX.build/Debug/hpx_logging.build/Objects-normal/x86_64/logging.d --serialize-diagnostics ${REPOS}/Repositories/hpx/cmake-build-debug/libs/logging/HPX.build/Debug/hpx_logging.build/Objects-normal/x86_64/logging.dia -c ${REPOS}/Repositories/hpx/libs/logging/src/logging.cpp -o ${REPOS}/Repositories/hpx/cmake-build-debug/libs/logging/HPX.build/Debug/hpx_logging.build/Objects-normal/x86_64/logging.o
In file included from ${REPOS}/Repositories/hpx/libs/logging/src/logging.cpp:11:
In file included from ${REPOS}/Repositories/hpx/libs/logging/include/hpx/logging.hpp:17:
In file included from ${REPOS}/Repositories/hpx/libs/logging/include/hpx/logging/logging.hpp:21:
In file included from ${REPOS}/Repositories/hpx/libs/logging/include/hpx/logging/detail/logger.hpp:21:
In file included from ${REPOS}/Repositories/hpx/libs/logging/include/hpx/logging/detail/cache_before_init.hpp:22:
In file included from ${REPOS}/Repositories/hpx/libs/logging/include/hpx/logging/writer/named_write.hpp:29:
In file included from ${REPOS}/Repositories/hpx/libs/logging/include/hpx/logging/format/formatter/high_precision_time.hpp:34:
In file included from ${REPOS}/Repositories/hpx/libs/logging/../../hpx/lcos/local/spinlock.hpp:17:
${REPOS}/Repositories/hpx/libs/logging/../../hpx/runtime/threads/thread_helpers.hpp:13:10: fatal error: 'hpx/concurrency/register_locks.hpp' file not found
#include <hpx/concurrency/register_locks.hpp>
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

@parsa sorry about that. https://github.com/STEllAR-GROUP/hpx/blob/ee38b8bd657607a7e52587fcf3df6d06fb4a3480/libs/logging/include/hpx/logging/format/formatter/high_precision_time.hpp#L30-L31 needs the same treatment.