superMemberInjector generated with missing type information

In Toothpick 3.0.0 there's an issue where the generated __MemberInjector has an incorrect superMemberInjector field i.e. it does not set the type argument correctly.
E.g. assume we have AddNewActivity with @Inject annotated fields. AddNewActivity extends BaseActivity which has a type parameter e.g.

public class AddNewActivity extends BaseActivity<Integer> {
 // ...
}

where BaseActivity is:
abstract class BaseActivity<T> : SomeInterfaceWithGeneric<T>, AppCompatActivity() {

    @Inject
    lateinit var dummyDependency: DummyDependency
}

When you try to build the project KAPT will fail with the following reason:
> Task :kaptDebugKotlin FAILED
e: /Users/me/workspace/toothpick/toothpick-sample/build/generated/source/kapt/debug/com/example/toothpick/activity/AddNewActivity__MemberInjector.java:9: error: cannot find symbol
  private MemberInjector<BaseActivity<T>> superMemberInjector = new com.example.toothpick.activity.BaseActivity__MemberInjector();
                                      ^
  symbol:   class T
  location: class AddNewActivity__MemberInjector
e: /Users/me/workspace/toothpick/toothpick-sample/build/generated/source/kapt/debug/com/example/toothpick/activity/AdvancedBackpackItemsActivity__MemberInjector.java:9: error: cannot find symbol
  private MemberInjector<BaseActivity<T>> superMemberInjector = new com.example.toothpick.activity.BaseActivity__MemberInjector();

Generated AddNewActivity__MemberInjector
public final class AddNewActivity__MemberInjector implements MemberInjector<AddNewActivity> {
  private MemberInjector<BaseActivity<T>> superMemberInjector = new com.example.toothpick.activity.BaseActivity__MemberInjector();

  @Override
  public void inject(AddNewActivity target, Scope scope) {
    superMemberInjector.inject(target, scope);
    target.backpackItemValidator = scope.getInstance(BackpackItemValidator.class);
  }
}

I've added an example in toothpick-sample app to reproduce this:
https://github.com/stephanenicolas/toothpick/compare/master...zawadz88:super-member-injector-bug
This happens if AddNewActivity is in either Java or Kotlin and has @Inject annotated fields/properties. The issue does not occur in Kotlin when using the newly introduced inject delegates (thanks for introducing these!).

Hi Piotr,
Thanks for the report and sample!
I'll take a look at it on Monday and probably release a patch.
On Fri, Aug 23, 2019, 4:37 PM Piotr Zawadzki<EMAIL_ADDRESS>wrote:

In Toothpick 3.0.0 there's an issue where the generated __MemberInjector
has an incorrect superMemberInjector field i.e. it does not set the type
argument correctly.
E.g. assume we have AddNewActivity with @Inject annotated fields.
AddNewActivity extends BaseActivity which has a type parameter e.g.
public class AddNewActivity extends BaseActivity {
// ...
}
where BaseActivity is:
abstract class BaseActivity : SomeInterfaceWithGeneric, AppCompatActivity() {
@Inject
lateinit var dummyDependency: DummyDependency

}
When you try to build the project KAPT will fail with the following reason:

Task :kaptDebugKotlin FAILED
e: /Users/me/workspace/toothpick/toothpick-sample/build/generated/source/kapt/debug/com/example/toothpick/activity/AddNewActivity__MemberInjector.java:9: error: cannot find symbol
private MemberInjector<BaseActivity> superMemberInjector = new com.example.toothpick.activity.BaseActivity__MemberInjector();
^
symbol:   class T
location: class AddNewActivity__MemberInjector
e: /Users/me/workspace/toothpick/toothpick-sample/build/generated/source/kapt/debug/com/example/toothpick/activity/AdvancedBackpackItemsActivity__MemberInjector.java:9: error: cannot find symbol
private MemberInjector<BaseActivity> superMemberInjector = new com.example.toothpick.activity.BaseActivity__MemberInjector();

Generated AddNewActivity__MemberInjector
public final class AddNewActivity__MemberInjector implements MemberInjector {
private MemberInjector<BaseActivity> superMemberInjector = new com.example.toothpick.activity.BaseActivity__MemberInjector();
@Override
public void inject(AddNewActivity target, Scope scope) {
superMemberInjector.inject(target, scope);
target.backpackItemValidator = scope.getInstance(BackpackItemValidator.class);
}
}
I've added an example in toothpick-sample app to reproduce this:
master...zawadz88:super-member-injector-bug
https://github.com/stephanenicolas/toothpick/compare/master...zawadz88:super-member-injector-bug
This happens if AddNewActivity is Java or Kotlin and has @Inject
annotated fields/properties. The issue does not occur in Kotlin when using
the newly introduced inject delegates (thanks for introducing these!).
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/stephanenicolas/toothpick/issues/360?email_source=notifications&email_token=ABMURZJOCVYZR75YD2KYOCLQF7Y3PA5CNFSM4IPAKLZ2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HHB3YJA,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABMURZLFMS7P6ZSD7LJGS23QF7Y3PANCNFSM4IPAKLZQ
.

@dlemures, I can take it. The problem comes from the T type param, I guess
we could explore recursively the super type (recursive for
BaseActivity<List>) and replacing with a wildcard ? Should work. Or
define T in the MI class signature...
TDD please. Thx for handling this.
On Fri, Aug 23, 2019, 09:37 Piotr Zawadzki<EMAIL_ADDRESS>wrote:

In Toothpick 3.0.0 there's an issue where the generated __MemberInjector
has an incorrect superMemberInjector field i.e. it does not set the type
argument correctly.
E.g. assume we have AddNewActivity with @Inject annotated fields.
AddNewActivity extends BaseActivity which has a type parameter e.g.
public class AddNewActivity extends BaseActivity {
// ...
}
where BaseActivity is:
abstract class BaseActivity : SomeInterfaceWithGeneric, AppCompatActivity() {
@Inject
lateinit var dummyDependency: DummyDependency

}
When you try to build the project KAPT will fail with the following reason:

Task :kaptDebugKotlin FAILED
e: /Users/me/workspace/toothpick/toothpick-sample/build/generated/source/kapt/debug/com/example/toothpick/activity/AddNewActivity__MemberInjector.java:9: error: cannot find symbol
private MemberInjector<BaseActivity> superMemberInjector = new com.example.toothpick.activity.BaseActivity__MemberInjector();
^
symbol:   class T
location: class AddNewActivity__MemberInjector
e: /Users/me/workspace/toothpick/toothpick-sample/build/generated/source/kapt/debug/com/example/toothpick/activity/AdvancedBackpackItemsActivity__MemberInjector.java:9: error: cannot find symbol
private MemberInjector<BaseActivity> superMemberInjector = new com.example.toothpick.activity.BaseActivity__MemberInjector();

Generated AddNewActivity__MemberInjector
public final class AddNewActivity__MemberInjector implements MemberInjector {
private MemberInjector<BaseActivity> superMemberInjector = new com.example.toothpick.activity.BaseActivity__MemberInjector();
@Override
public void inject(AddNewActivity target, Scope scope) {
superMemberInjector.inject(target, scope);
target.backpackItemValidator = scope.getInstance(BackpackItemValidator.class);
}
}
I've added an example in toothpick-sample app to reproduce this:
master...zawadz88:super-member-injector-bug
https://github.com/stephanenicolas/toothpick/compare/master...zawadz88:super-member-injector-bug
This happens if AddNewActivity is Java or Kotlin and has @Inject
annotated fields/properties. The issue does not occur in Kotlin when using
the newly introduced inject delegates (thanks for introducing these!).
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/stephanenicolas/toothpick/issues/360?email_source=notifications&email_token=AAN7PXPXZKVV5ED3ZTQLE4TQF7Y3NA5CNFSM4IPAKLZ2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HHB3YJA,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAN7PXLBLJTMRFC7TOGCLH3QF7Y3NANCNFSM4IPAKLZQ
.

I can't ***
On Fri, Aug 23, 2019, 09:50 Stéphane NICOLAS<EMAIL_ADDRESS>wrote:

@dlemures, I can take it. The problem comes from the T type param, I guess
we could explore recursively the super type (recursive for
BaseActivity<List>) and replacing with a wildcard ? Should work. Or
define T in the MI class signature...
TDD please. Thx for handling this.
On Fri, Aug 23, 2019, 09:37 Piotr Zawadzki<EMAIL_ADDRESS>wrote:

In Toothpick 3.0.0 there's an issue where the generated __MemberInjector
has an incorrect superMemberInjector field i.e. it does not set the type
argument correctly.
E.g. assume we have AddNewActivity with @Inject annotated fields.
AddNewActivity extends BaseActivity which has a type parameter e.g.
public class AddNewActivity extends BaseActivity {
// ...
}
where BaseActivity is:
abstract class BaseActivity : SomeInterfaceWithGeneric, AppCompatActivity() {
@Inject
lateinit var dummyDependency: DummyDependency

}
When you try to build the project KAPT will fail with the following
reason:

Task :kaptDebugKotlin FAILED
e: /Users/me/workspace/toothpick/toothpick-sample/build/generated/source/kapt/debug/com/example/toothpick/activity/AddNewActivity__MemberInjector.java:9: error: cannot find symbol
private MemberInjector<BaseActivity> superMemberInjector = new com.example.toothpick.activity.BaseActivity__MemberInjector();
^
symbol:   class T
location: class AddNewActivity__MemberInjector
e: /Users/me/workspace/toothpick/toothpick-sample/build/generated/source/kapt/debug/com/example/toothpick/activity/AdvancedBackpackItemsActivity__MemberInjector.java:9: error: cannot find symbol
private MemberInjector<BaseActivity> superMemberInjector = new com.example.toothpick.activity.BaseActivity__MemberInjector();

Generated AddNewActivity__MemberInjector
public final class AddNewActivity__MemberInjector implements MemberInjector {
private MemberInjector<BaseActivity> superMemberInjector = new com.example.toothpick.activity.BaseActivity__MemberInjector();
@Override
public void inject(AddNewActivity target, Scope scope) {
superMemberInjector.inject(target, scope);
target.backpackItemValidator = scope.getInstance(BackpackItemValidator.class);
}
}
I've added an example in toothpick-sample app to reproduce this:
master...zawadz88:super-member-injector-bug
https://github.com/stephanenicolas/toothpick/compare/master...zawadz88:super-member-injector-bug
This happens if AddNewActivity is Java or Kotlin and has @Inject
annotated fields/properties. The issue does not occur in Kotlin when using
the newly introduced inject delegates (thanks for introducing these!).
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/stephanenicolas/toothpick/issues/360?email_source=notifications&email_token=AAN7PXPXZKVV5ED3ZTQLE4TQF7Y3NA5CNFSM4IPAKLZ2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HHB3YJA,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAN7PXLBLJTMRFC7TOGCLH3QF7Y3NANCNFSM4IPAKLZQ
.

I've just checked and in TP 2.1.0 AddNewActivity__MemberInjector would actually look like this:
public final class AddNewActivity__MemberInjector implements MemberInjector<AddNewActivity> {
  private MemberInjector superMemberInjector = new com.example.toothpick.activity.BaseActivity__MemberInjector();

  @Override
  public void inject(AddNewActivity target, Scope scope) {
    superMemberInjector.inject(target, scope);
    target.backpackItemValidator = scope.getInstance(BackpackItemValidator.class);
  }
}

i.e. type argument <BaseActivity<T>> is not present in superMemberInjector field.
I'm wondering if it was added in TP 3.0 for a reason? Obviously it's nicer to have it, but it's not really needed in Java to compile at least.

Hi Piotr,
I made the change. The idea was to generate better code that wouldn't
trigger any error nor warnings. The TP 2.x code would trigger javac lint
warnings and I wanted to get rid of that.
I am traveling and can't address the  issue at the moment. I couldn't
neither get in touch with @dlemures about it and he will be traveling as
well.
Of you feel like it, it would be greatly appreciated if you could issue a
PR, with unit tests to fix the issue. Daniel will be able to release
shortly after. Please test it and add a unit test if you do so. The PR
should be green.
The problem lies in the MemberInjectorGenerator class.
Regards,
S.
On Mon, Aug 26, 2019, 10:38 Piotr Zawadzki<EMAIL_ADDRESS>wrote:

I've just checked and in TP 2.1.0 AddNewActivity__MemberInjector would
actually look like this:
public final class AddNewActivity__MemberInjector implements MemberInjector {
private MemberInjector superMemberInjector = new com.example.toothpick.activity.BaseActivity__MemberInjector();
@Override
public void inject(AddNewActivity target, Scope scope) {
superMemberInjector.inject(target, scope);
target.backpackItemValidator = scope.getInstance(BackpackItemValidator.class);
}
}
i.e. type argument <BaseActivity> is not present in superMemberInjector
field.
I'm wondering if it was added in TP 3.0 for a reason? Obviously it's nicer
to have it, but it's not really needed in Java to compile at least.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/stephanenicolas/toothpick/issues/360?email_source=notifications&email_token=AAN7PXJ2DWW36GDK6HBJDILQGP2H7A5CNFSM4IPAKLZ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5EYAKQ#issuecomment-524910634,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAN7PXOOXUK7HAW2IAB6ABLQGP2H7ANCNFSM4IPAKLZQ
.

Hi @stephanenicolas ,
So I was playing around with this a bit and seems that it would have to generate:
public final class AddNewActivity__MemberInjector implements MemberInjector<AddNewActivity> {
  private MemberInjector<BaseActivity> superMemberInjector = new com.example.toothpick.activity.BaseActivity__MemberInjector();

  @Override
  public void inject(AddNewActivity target, Scope scope) {
    superMemberInjector.inject(target, scope);
    target.backpackItemValidator = scope.getInstance(BackpackItemValidator.class);
  }
}

It cannot be
private MemberInjector<BaseActivity> superMemberInjector = new com.example.toothpick.activity.BaseActivity__MemberInjector();

as BaseActivity__MemberInjector does not have a specific type. Having MemberInjector<BaseActivity> superMemberInjector also doesn't seem to produce any warnings.
I was able to achieve this by using
diff --git a/toothpick-compiler/src/main/java/toothpick/compiler/memberinjector/generators/MemberInjectorGenerator.java b/toothpick-compiler/src/main/java/toothpick/compiler/memberinjector/generators/MemberInjectorGenerator.java
index 274a434..c767e6a 100644
--- a/toothpick-compiler/src/main/java/toothpick/compiler/memberinjector/generators/MemberInjectorGenerator.java
+++ b/toothpick-compiler/src/main/java/toothpick/compiler/memberinjector/generators/MemberInjectorGenerator.java
@@ -90,7 +90,7 @@ public class MemberInjectorGenerator extends CodeGenerator {
           FieldSpec.builder(
                   ParameterizedTypeName.get(
                       ClassName.get(MemberInjector.class),
-                      TypeName.get(superClassThatNeedsInjection.asType())),
+                      TypeName.get(typeUtil.erasure(superClassThatNeedsInjection.asType()))),
                   "superMemberInjector",
                   Modifier.PRIVATE)
               // TODO use proper typing here

Are you OK with approach? If so, I can add some proper unit tests and submit a PR.

Nice to start the week with a PR for TP! Reviewed.

Thx for the PR @zawadz88 . I was wondering how you manage to instantiate a generic activity ? By subclassing, right ?

Yes, that's exactly right. Parent Activity contains a generic type.

Thx Piotr. I added a Contributing.md file to the repo. Feel free to review
it.
On Tue, Aug 27, 2019, 00:16 Piotr Zawadzki<EMAIL_ADDRESS>wrote:

Thx for the PR @zawadz88 https://github.com/zawadz88 . I was wondering
how you manage to instantiate a generic activity ? By subclassing, right ?
Yes, that's exactly right. Parent Activity contains a generic type.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/stephanenicolas/toothpick/issues/360?email_source=notifications&email_token=AAN7PXNU2JPOT5JEDAG376TQGS2EPA5CNFSM4IPAKLZ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD5GQJXY#issuecomment-525141215,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAN7PXL2AGYU4YY6I3D7U6DQGS2EPANCNFSM4IPAKLZQ
.

I added a Contributing.md file to the repo. Feel free to review it.

Thanks! I'd probably add some info to check if all checks pass before submitting the PR (for forked repos the build gets executed once you submit a PR).
So in other words execute the same commands which are specified in .travis.yml:
./gradlew clean check
./gradlew -b toothpick-sample/build.gradle clean check -x lint

What do you think?

Improved CONTRIBUTING.md with @zawadz88 comments!
thx

TP 3.0.1 with the fix has been released!
Closing


Add validators section for stake claiming transactions

Add the validators section for stake claim transactions
Changes

Introduced new expandable section "Claim from validators" for stake claim transactions.
Adjusted the spacing for expandable section heading.
Fixed the Stake claim NFT status for "To be claimed" scenario.

Demo
https://github.com/radixdlt/babylon-wallet-ios/assets/118184705/aa9c1f00-5138-44ee-91ba-7a799e3b013b

Perhaps "beingClaimed" is more clear that "toBeClaimed"? That is what it means, rigjt?


Server rendering bug

ReferenceError: window is not defined

fixed https://github.com/gorangajic/react-svg-morph/commit/dfc90c4da0bd881c23b2e1de2e39b0018aed10e2
published on npm v0.1.3

Still ran into this problem at version v0.1.6.

try now https://github.com/gorangajic/react-svg-morph/commit/0535555f702b0cee732cdde81dc24e8ea5d1b96f

@gorangajic Thanks for the quick fix. 😭
But there is one missed window object checking in svglite.js
I send a PR#11 to fix that. Please review it. Thanks! 😉


Creating directory fails due to forward slashes in path on win32

Running 'mkdir 'c:/Data/projects/online/testproject''
The syntax of the command is incorrect.
c:/Ruby/lib/ruby/gems/1.8/gems/suspenders-0.0.3/lib/command.rb:8:in `run': Command mkdir 'c:/Data/projects/online/testproject' failed: 256 (RuntimeError)
        from c:/Ruby/lib/ruby/gems/1.8/gems/suspenders-0.0.3/lib/create.rb:24:in `create_project!'
        from c:/Ruby/lib/ruby/gems/1.8/gems/suspenders-0.0.3/lib/create.rb:15:in `run!'
        from c:/Ruby/lib/ruby/gems/1.8/gems/suspenders-0.0.3/bin/suspenders:15
        from c:/Ruby/bin/suspenders:19:in `load'
        from c:/Ruby/bin/suspenders:19

Temporary Solution

if RUBY_PLATFORM =~ /(win|w)32$/
  project_directory = @project_directory.gsub("/", "\\")
end

We're using File.join where possible here.


Alphabetical Ordering Of Endpoints

The endpoints are out of order, currently not being sorted alphabetically.

Is there an option to specify the ordering of endpoints?

@dalezak Please check the documentation. There is a key named sort_order to order the endpoints.

@alfie-max looks like your PR would fix the issue, is it possible to merge this @MyExperiments?
Note, the sort_order works fine for ordering index, show, create, etc but the models are out of order. if you look at my screenshot above, you'll notice that Areas is below Organizations and Tasks.

Exactly.. i have 3 level directory structure.
Without the sort, Products comes first for me

@MyExperiments any plans to address this issue?


REQUEST: Tom Brady's Balls

Can someone create a quote generator about Tom Brady's balls? Some good ones here...
http://mashable.com/2015/01/22/tom-bradys-balls/

I made one: https://github.com/mikestecker/bradys-balls - feel free to import if you'd like

I saw the docs about publishing, closing this.


Deny /f fly if you are creative

Please make sure your issue complies with these guidelines:

[*] Server Software must be the official PMMP w/o vanilla patching plugins (i.e. TeaSpoon)

[*] Issue must have not been reported previously

[*] Make sure you are on the latest version of PMMP & PiggyFactions

[*] Have a detailed title.

Issue Description

Expected result: What were you expecting to happen?
That when I activated the fly in creative mode, it gave me a warning like "you cannot activate the flight in creative mode"
Actual result: What actually happened?
Activate the flight

Steps to Reproduce the Issue

/gamemode 1
/f fly

OS and Versions

PocketMine-MP: 3.15.1
PiggyFactions: Dev #126
PHP: 7
Server OS: Windows 10

Extra Information

why? what's wrong with f fly in creative?

It makes no sense to activate the fly when you are creative

This isn't really a bug, more of an enhancement. Not really a priority, just don't use the command if you're in creative...


Ionic 2 Aws file upload.

How to upload an image to amazon s3 using ionic 2.

For support requests, please see the forum.
However, note that you are looking for how to upload an image using angular, not related to ionic.

Hello! Thanks for opening an issue with us! As this seems like more of a support question I will urge that you ask this question on our forum or on our slack channel. Thanks for using Ionic!


Initial pass at Zenodo integration docs

No code or functionality changes, just developer-oriented docs for adding additional Zenodo integrations.

Thanks!


115: failed get objs: failed to list objs: invalid character 'a' looking for beginning of value

showing error message
failed get objs: failed to list objs: invalid character 'a' looking for beginning of value
a bug happens after 115 server fix on Sep,17

defaultUserAgent = "Mozilla/5.0 115Desktop/" + appVer
Have to change UA to 115Browser due to the recent incident.


Documentation clarifications.

Updates to the README to address a number of things that tripped me up as I was using VGM.

Updated wording around response wrapping.
Indicate how to unwrap a token response via HTTP.
Make clear that GATE_POLICIES should not start with secret/.
Indicate what policies the VGM token needs to have.
Update API document for unseal with options for wrapped-token.

Thanks for your contributions - I'm actually heading to europe in the next couple of hours - and I'd like to test your changes before I merge them. These PRs will probably sit for a day or two - just wanted to let you know I'm not ignoring them.

No problem! Ideally it would be nice to have a release too if possible!


New rule E3022 to validate SubnetIDs are only used in one Route Table association

Issue #, if available:
Description of changes:
Subnets can only have a single route table association. If there are two associations to the same subnet things will go poorly.  This tries to find dups across conditions.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Glorious. Catches exactly the error I wanted it to. 🥇


Sent relationships are not visible with excel_bulk_entities_upload.py

Congratulations and many thanks for this great tool!
The sample provided are very useful but I cannot figure out how the custom attributes and relationships are passed to the Atlas API.
For instance, the script samples/excel/excel_bulk_entities_upload.py produces an excel BulkEntities sheet with two additional columns: "[Relationship] table", and "type".
The corresponding information is visible in the dict outputed by excel_reader.parse_bulk_entities(), but I cannot find them in the result of client.upload_entities() that also get printed on the console (see below). How are the attributes "[Relationship] table", and "type" passed to Apache Atlas in this case?
I would really need to understand that to grasp exactly what kind of related objects I can pass to the catalog API with pyapacheatlas.
runfile('C:/Users/FBEDECARRA/Desktop/Tests Apache Atlas/sample_bulk_upload.py', wdir='C:/Users/FBEDECARRA/Desktop/Tests Apache Atlas')
{
  "mutatedEntities": {
    "CREATE": [
      {
        "typeName": "DataSet",
        "attributes": {
          "qualifiedName": "pyapacheatlas://dataset",
          "name": "exampledataset"
        },
        "guid": "f24c4f22-c5e3-4776-a630-41e533b47099",
        "status": "ACTIVE",
        "displayText": "exampledataset",
        "classificationNames": [],
        "classifications": [],
        "meaningNames": [],
        "meanings": [],
        "isIncomplete": false,
        "labels": []
      },
      {
        "typeName": "hive_table",
        "attributes": {
          "createTime": 0,
          "qualifiedName": "pyapacheatlas://hivetable01",
          "name": "hivetable01"
        },
        "guid": "46efb945-281d-497b-8334-92c668fb8d5b",
        "status": "ACTIVE",
        "displayText": "hivetable01",
        "classificationNames": [],
        "classifications": [],
        "meaningNames": [],
        "meanings": [],
        "isIncomplete": false,
        "labels": []
      },
      {
        "typeName": "hive_column",
        "attributes": {
          "qualifiedName": "pyapacheatlas://hivetable01#colA",
          "name": "columnA"
        },
        "guid": "195d4775-69f0-48fe-b63c-88c0e30066fa",
        "status": "ACTIVE",
        "displayText": "columnA",
        "classificationNames": [],
        "classifications": [],
        "meaningNames": [],
        "meanings": [],
        "isIncomplete": false,
        "labels": []
      },
      {
        "typeName": "hive_column",
        "attributes": {
          "qualifiedName": "pyapacheatlas://hivetable01#colB",
          "name": "columnB"
        },
        "guid": "f43b8f63-63da-4c82-b5f5-2b09c0418e67",
        "status": "ACTIVE",
        "displayText": "columnB",
        "classificationNames": [],
        "classifications": [],
        "meaningNames": [],
        "meanings": [],
        "isIncomplete": false,
        "labels": []
      },
      {
        "typeName": "hive_column",
        "attributes": {
          "qualifiedName": "pyapacheatlas://hivetable01#colC",
          "name": "columnC"
        },
        "guid": "f1650ead-6b7e-4dce-aa2b-03ddb18ebca3",
        "status": "ACTIVE",
        "displayText": "columnC",
        "classificationNames": [],
        "classifications": [],
        "meaningNames": [],
        "meanings": [],
        "isIncomplete": false,
        "labels": []
      }
    ]
  },
  "guidAssignments": {
    "-1005": "f1650ead-6b7e-4dce-aa2b-03ddb18ebca3",
    "-1004": "f43b8f63-63da-4c82-b5f5-2b09c0418e67",
    "-1001": "f24c4f22-c5e3-4776-a630-41e533b47099",
    "-1003": "195d4775-69f0-48fe-b63c-88c0e30066fa",
    "-1002": "46efb945-281d-497b-8334-92c668fb8d5b"
  }
}
Completed bulk upload successfully!
Search for hivetable01 to see your results.

@fBedecarrats I apologize for not getting back to you sooner!  Apparently I need to turn on notifications of new issues!
Your specific ask is a bit buried in the readers module.  Specifically, these lines (111-124 of reader.py) show the following steps:

While parsing the rows, it looks to see if the header begins with [Relationship]
If so, it removes the token [Relationship] and assumes anything afterwards is the relationship attribute name.
The Relationship column should reference an entity that was already "created" in a preceding line.
The algorithm then looks up this referenced entity.
The referenced entity's main attributes (temporary guid, typeName, and qualifiedName) are then appended to the current row's "relationshipAttributes" field.

You don't see it on that particular output as that is the response from Purview.  If you call client.get_entity("46efb945-281d-497b-8334-92c668fb8d5b") you should see the relationshipAttributes field with an array of hive_column entities.
If you really want to learn how the relationships work, you can take a look at this CRUD sample instead that shows creating a table from scratch and different ways of instantiating the relationship between table and columns (either through the array on the table or the single table reference from each column).

@fBedecarrats I apologize for not getting back to you sooner!  Apparently I need to turn on notifications of new issues!
Your specific ask is a bit buried in the readers module.  Specifically, these lines (111-124 of reader.py) show the following steps:

While parsing the rows, it looks to see if the header begins with [Relationship]
If so, it removes the token [Relationship] and assumes anything afterwards is the relationship attribute name.
The Relationship column should reference an entity that was already "created" in a preceding line.
The algorithm then looks up this referenced entity.
The referenced entity's main attributes (temporary guid, typeName, and qualifiedName) are then appended to the current row's "relationshipAttributes" field.

You don't see it on that particular output as that is the response from Purview.  If you call client.get_entity("46efb945-281d-497b-8334-92c668fb8d5b") you should see the relationshipAttributes field with an array of hive_column entities.
If you really want to learn how the relationships work, you can take a look at this CRUD sample instead that shows creating a table from scratch and different ways of instantiating the relationship between table and columns (either through the array on the table or the single table reference from each column).

Thank you for your answer, it is very useful. I must say it is a smart trick! I think it would be useful to give some hints on how a user could handle this feature (besides the demo template) in pyapacheatlas/samples/excel/README.md.
I'm closing the issue/question. Thanks again.
PS : I have been testing several import scenarios with pyapacheatlas and I have some suggestions about useful complementary functionalities (creating classifications from Excel, defining entity of a different SuperType than DataSet...). I'll mention them as new issues. Please feel free to ignore and close them if it doesn't fit your roadmap.

Thank you for your answer, it is very useful. I must say it is a smart trick! I think it would be useful to give some hints on how a user could handle this feature (besides the demo template) in pyapacheatlas/samples/excel/README.md.
I'm closing the issue/question. Thanks again.
PS : I have been testing several import scenarios with pyapacheatlas and I have some suggestions about useful complementary functionalities (creating classifications from Excel, defining entity of a different SuperType than DataSet...). I'll mention them as new issues. Please feel free to ignore and close them if it doesn't fit your roadmap.

@fBedecarrats  - I love the feedback!  Thank you so much for investing your time in exploring the package and offering suggestions!  I will also provide some better details on the excel README for how users can take advantage of the relationship attributes.

@fBedecarrats  - I love the feedback!  Thank you so much for investing your time in exploring the package and offering suggestions!  I will also provide some better details on the excel README for how users can take advantage of the relationship attributes.


When I collapse the slide the layout is restored to the begging

Hi, I'm trying to do a Slide Panel, coming from the bottom. When I have it expanded I can make changes in some widgets, but when I touch the panel to slide to the bottom, it seems to reload the main layout.
Imagine... one recyclerview and one imageview. If there is data, the recyclerview is showed (default behaivour), if there isn't data the recyclerview is gone and the image is visible. But when I touch the panel no go to the bottom, the layout change a the beginning... WTF

i have the same problem, do u find any solution???
when i expand slide panel, my variables in main layout set to default !!!!!


Application doesn't reload when change is made in codebase. Development is running on docker.

What I'm trying to achieve
Running development in docker with docker-compose up I want to reload the source code in docker when I make a change in code on host.
Steps to reproduce the problem

run docker-compose up
change something in code base, e.g. change currency in settings.py DEFAULT_CURRENCY = 'EUR'

What I expected to happen
Currency is not changed in running application and  still showing in USD.
Screenshots

System information
Operating system: Linux Mint 19.1
Browser: Google Chrome Version 71.0.3578.98 (Official Build) (64-bit)

@michaljelonek yes, after updating the branch it works like a charm. Thx.


Code is now broken for first edition of the book

I have the first edition of the book.  I just cloned the repo and tried to build with jdk8 and it's broken all over the place.  Could you create a tag or branch for the Java 8 version?

git reset --hard ae8122f433f90a8bfed7244cdf6f99271f1d1125

switch to previous commit to get first edition code.
git reset --hard ae8122f433f90a8bfed7244cdf6f99271f1d1125


Unrelated commits included when auditing modified casks during Travis builds

The commit range provided by Travis in the enrivonment variable TRAVIS_COMMIT_RANGE does not appear to include only those commits to be merged in a pull request, as evidenced by this spurious build failure (#12899).
We may want to hard-code the commit range in .travis.yml as refs/remotes/origin/HEAD..HEAD to ensure that only commits relevant to the pull request are considered when auditing modified Casks.

Go for whatever solution you find best. You have been finding a lot of areas where our Travis checks can be improved, and have been fast and efficient in patching those. Feel free to proceed as you like, with Travis.


[KARAF-5357] Fixes mistake in feature help info

This PR simply fixes a typo in the text that is displayed when someone looks up info on the 'feature' command in the karaf client console.

R: @jbonofre


Email validation

Hi, new domain extensions have more than 4 digits, example  domain.rocks, backbone.studio, etc. This REGEX needs to be updated.
Line 805 of Validator.js
return this.validateMatch(name, value, /^[A-Z0-9._%+-]+@[A-Z0-9.-]+.[A-Z]{2,4}$/i);

I'll take care of this for the next release. :)

@oscarvegar In v1.0.8 regex was updated to allow email domains with a max of 8 characters.


Why is there no reverseDynamics with contacts?

I can see forwardDynamics function that takes contacts as parameters.
But inverseDynamics does not.
Why is that?
And what would be a way to implement it?

Dear @mklvcm,
You can have a look at TSID repository, which is a layer on top of Pinocchio to do what you want to achieve.
Best,
Justin

I will close this issue as it seems to be solved. @mklvcm Feel free to reopen it if needed.

Hi Justin,
I'm afraid I'm testing your patience here and annoy the hell out of you but I can't help but ask :)
Similar question was asked long time ago here: https://github.com/stack-of-tasks/pinocchio/issues/61
Back then you said "You just need to compute the jacobian of contacts..." and apparently topic starter was happy.
Because I'm more ignorant than that guy, can I ask you to provide a sample of code, even if pseudo-code.
Thanks
Misha.
PS. No I cannot re-open issue if closed by you.

A first answer was indeed provided in #61, in the case where you know the contact forces you may want to apply, for instance, in the context where the contact forces are related to the sole deformation with a spring-damper model.
Before going further into my answer, could you provide a typical setup where you want to perform inverse dynamics?

Hi Justin,
My case is 4-legged robot walking on uneven terrain.
I'm trying to use inverseDynamics to calculate torques.
I understand that I need to know external forces but I don't know them.
Instead I know which out of 4 legs are in contact with the ground.
If there was an overload of inverseDynamics that takes contacts that would solve my problem.
Now I see that such overload exists for forwardDynamics and I'm wondering why not for inverseDynamics? And how hard would it be to write one?
Any code sample would be appreciated!
Thanks,
Misha

@mklvcm Sorry for the late reply, but a quick answer to your question is that:
while the forward dynamics is a well-posed problem because for any torque you apply on the joints of the robot, then you can get the joint acceleration of the system submitted to gravity, the inverse dynamics is an ill-posed problem in the sense you don't know the actuation for the free-floating joint of your robot.
That's why you have to resort on TSID, which means Task Space Inverse Dynamics, which allows you to compute one (possible) solution.


DIA-207 Adding tracking for genes clicks and Highlights on the artist page

The type of this PR is: Enhancement
This PR resolves DIA-207
Description
This PR adds tracking in Cohesion for both Eigen and Force for 2 events:

click on one of the gens in the "related categories" section in the about tab of an artist page
click on one of the accordion in Highlight and Achievements in the Artist header

:rocket: PR was released in v4.153.0 :rocket:


Update French localization

As a follow-up to #4611 and #4637 this PR adds translations for new strings, especially some high-visibility starter pack-related ones. It also includes one correction where I had missed changing Packs to Kits.
I'd be grateful if you could take a look @Signez 🙏

Thanks again @Signez, suggestion applied 🙏

I've added translations for the new strings that have been added recently, including the onboarding tour, the progress guide etc.
I'd be grateful if you could look them over please @Signez 🙏

All suggestions applied, once again many thanks @Signez for your quick and helpful feedback! :)
This is now up-to-date and ready to go @pfrazee 🫡


nixos/firewall: canonicalize ports lists

Motivation for this change
Avoids duplicate firewall entries and makes the iptables output easier to read by having rules sorted by port number.
Used the opportunity to use types.port where applicable.
@GrahamcOfBorg test firewall
Things done

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

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

[x] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[x] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[x] Determined the impact on package closure size (by running nix path-info -S before and after)
[x] Assured whether relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

@GrahamcOfBorg test buildbot
Random test which uses some firewall rules.

Looks like buildbot is probably broken in master right now, unrelated to this. The aarch64-linux version of the test passed so that says enough for the buildbot test.
I'll run another just for fun :man_shrugging:
@GrahamcOfBorg test samba


SAMZA-1592: Fix Hello-Samza latest after Kafka 0.11 upgrade in Samza

After the Kafka-0.11 upgrade, the latest branch in hello-samza (and hence all our open-source tutorials that rely on it) are broken. Users who follow the tutorial will see a NoSuchMethodError when starting their job due to a mismatch of Kafka versions. This PR makes both Kafka versions consistent by updating the hello-samza tutorial to use Kafka-0.11

@prateekm @nickpan47 Can one of you give me a +1 on this PR?


How to create custom rules to scan secerts in .yaml or .properties file

Describe the bug
With below custom rule, we are trying to find the secerts in .yaml|.yml|.properties file, but its not working as expected.
[[rules]]
description = "Generic Secerts in resources"
regex = '''(?i)(?:key|api|token|secret|client|passwd|password|auth|access)(?:[0-9a-z\-_\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|\|\|:|<=|=>|:)(?:'|\"|\s|=|\x60){0,5}([0-9a-z\-_.=]{10,150})(?:['|\"|\n|\r|\s|\x60|;]|$)'''
path = '''(?i)(\.prop*|\.yml|\.yaml)'''
tags = ["key", "properties", "Yaml"]

To Reproduce
Steps to reproduce the behavior:
Expected behavior
We would like to scan the secrets in project (like springboot etc),to scan only these two extensions (.yaml & .properties)
Screenshots
If applicable, add screenshots to help explain your problem.
Basic Info (please complete the following information):

OS: Windows
Gitleaks Version: 8.15.2

Additional context
Add any other context about the problem here.
cc @zricethezav

but its not working as expected.

Hi @pvimalmec . Can you describe the behavior you are seeing with your custom rule?

but its not working as expected.

Hi @pvimalmec . Can you describe the behavior you are seeing with your custom rule?

@weineran when used the above custom rule, its scanning all the files within my project (like *.java, Jenkinsfile, *.json and so on). I would like to scan only the  .yaml or .properties file.
I have tried to separate the rules like below
[[rules]]
description = "Generic Secerts in Properties file"
regex = '''(?i)(?:key|api|token|secret|client|passwd|password|auth|access)(?:[0-9a-z-\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|||:|<=|=>|:)(?:'|"|\s|=|\x60){0,5}([0-9a-z-.=]{10,150})(?:['|"|\n|\r|\s|\x60|;]|$)'''
path = '''(?i)(.prop*|.yml|.yaml)'''
tags = ["key", "properties"]
[[rules]]
description = "yaml secrets"
regex = '''(?i)(password|token|secret|client|passwd|enc.key|auth.pass):\s+(.*)'''
path = '''(?i)(.yml|.yaml)'''
tags = ["key", "yaml"]
When i tried this, its not finding the secerts in *. properties  files. Its give us zero leaks. but i have many secerts matching the pattern in my application.properties

Understood. Can you post the verbose logs from gitleaks when you run it with the above config?

Understood. Can you post the verbose logs from gitleaks when you run it with the above config?

Below is the verbose logs when i used two separate rules
`
○
│╲
│ ○
○ ░
░    gitleaks
9:54PM INF 400 commits scanned.
9:54PM INF scan completed in 1.54s
9:54PM INF no leaks found
`

Hmmm is there nothing in the log output that mentions the config file?
Can you post the command you are running?

[[rules]]
description = "Generic Secerts in Properties file"
regex = '''(?i)(?:key|api|token|secret|client|passwd|password|auth|access)(?:[0-9a-z-\t .]{0,20})(?:[\s|']|[\s|"]){0,3}(?:=|>|:=|||:|<=|=>|:)(?:'|"|\s|=|\x60){0,5}([0-9a-z-.=]{10,150})(?:['|"|\n|\r|\s|\x60|;]|$)'''
path = '''(?i)(.prop*|.yml|.yaml)'''
tags = ["key", "properties"]
[[rules]]
description = "yaml secrets"
regex = '''(?i)(password|token|secret|client|passwd|enc.key|auth.pass):\s+(.*)'''
path = '''(?i)(.yml|.yaml)'''
tags = ["key", "yaml"]

Hmmm is there nothing in the log output that mentions the config file?
Can you post the command you are running?

gitleaks detect  -c .\gitleaks.toml --verbose

@pvimalmec add  --log-level=debug to see debug logs

Can you post an example of a secret you'd expect it to detect in a .properties or .yml file?
You mentioned that it's scanning other files such as .java, .json, etc. Can you post an example of that?
Or even better, if you could post an example repo that we can use to reproduce the issue, that might be best.

Here is the repo which scans only the secerts in yaml file.
https://github.com/pvimalmec/gitleaks-repo.git

@pvimalmec As you can see in the logs you posted in the Readme, the scan successfully detected 3 leaks: https://github.com/pvimalmec/gitleaks-repo/blob/main/README.md?plain=1#L15
If you want to see details about the leaks, add the -v, --verbose flag.
Here is the full output on my system, running the latest version of gitleaks:
$ ../../gitleaks/gitleaks version
v8.15.2
$ ../../gitleaks/gitleaks detect -c gitleaks.toml --log-level=debug -v

    ○
    │╲
    │ ○
    ○ ░
    ░    gitleaks

9:05AM DBG using gitleaks config gitleaks.toml from `--config`
9:05AM DBG executing: /usr/bin/git -C . log -p -U0 --full-history --all
Finding:     password: test1234
Secret:      password: test1234
RuleID:
Entropy:     3.794653
File:        application.yaml
Line:        4
Commit:      b75ace2f377f372c3a40f93fd00c5829fae73f1a
Author:      periyasamy003
Email<EMAIL_ADDRESS>Date:        2023-01-20T09:59:16Z
Fingerprint: b75ace2f377f372c3a40f93fd00c5829fae73f1a:application.yaml::4

Finding:     password: test123
Secret:      password: test123
RuleID:
Entropy:     3.690116
File:        application.yaml
Line:        4
Commit:      45e9ffe9acc7135fcc08ee2d307b096df525d7bb
Author:      periyasamy003
Email<EMAIL_ADDRESS>Date:        2023-01-20T09:57:33Z
Fingerprint: 45e9ffe9acc7135fcc08ee2d307b096df525d7bb:application.yaml::4

Finding:     password: dbpwd
Secret:      password: dbpwd
RuleID:
Entropy:     3.189898
File:        application.yaml
Line:        10
Commit:      45e9ffe9acc7135fcc08ee2d307b096df525d7bb
Author:      periyasamy003
Email<EMAIL_ADDRESS>Date:        2023-01-20T09:57:33Z
Fingerprint: 45e9ffe9acc7135fcc08ee2d307b096df525d7bb:application.yaml::10

9:05AM INF 3 commits scanned.
9:05AM DBG Note: this number might be smaller than expected due to commits with no additions
9:05AM INF scan completed in 52.8ms
9:05AM WRN leaks found: 3

@weineran  I agree but it actually show only the secerts from the yaml (application.yaml) not from the [application.properties].
Hope you got what im looking for. gitleaks should scan the secret in application.properties https://github.com/pvimalmec/gitleaks-repo/blob/main/application.properties#L2

In order to debug your issue, I can suggest a couple next steps:

Make sure each rule in your config includes an id. The first two rules in your config do not have an id. As a result, the RuleID fields in the findings above are blank. So it's unclear which rule is detecting those secrets. It looks like the secrets are being detected by the second rule in the config, but you'll want to confirm.
Ask yourself which rule you expect to detect the secrets in .properties file. Then use https://regex101.com/ to test out your rules and debug them until they detect the secrets that you want them to detect.

Another option is to just start with the generic-api-key rule in the default config, and tweak it until it works for you. For example, you could change {10,150} to {5,150}, and that should catch all the secrets in your example repo.
I hope that helps.

@weineran  Thanks,  Is it not possible to scan only specfic files rather doing scan all files available in the repo/project?

It should be possible.
In your example repo, create a copy of your application.yaml file and rename it application.txt. You should see that the second rule in your config will detect secrets in the .yaml file but not in the .txt file.
Can you confirm?

Yes, i can confirm it doesnt scan in .txt file?

Great, so that means it is behaving as desired, correct?

@pvimalmec Following up on this issue, are the custom rules working as desired or did I misunderstand?


Figure out why the website doesn't work with Chrome Beta

It looks like this is because we were specifying the timeStyle option incorrectly for Intl.DateTimeFormat. Chrome Beta added support for this option, which made things start throwing errors. https://github.com/uclaacm/hoth.uclaacm.com/pull/60, when merged, will fix this.

Fixed by #64 too.


Allow Multiple iterations on a single page.

I created a solution for this, should I post for a pull request?

I'm sorry. I have no idea what "multiple iterations on a single page" means. :\

When I have multiple inputs using ngtagsinput angular throws an error.
Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}

On Apr 29, 2015, at 11:00, Michael Benford<EMAIL_ADDRESS>wrote:
I'm sorry. I have no idea what "multiple iterations on a single page" means. :\
—
Reply to this email directly or view it on GitHub.

Could you provide a plunker showing your problem? You can use this template.

I have the same Error: "[ngRepeat:dupes] Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: tag in tagList.items track by track(tag), Duplicate key: translation.requested" ... the solution is to use "track by $index"

i get this same error as well.  Its only when you're using the autocomplete on the 2nd one.  @wandertosee can you post the pull request?

This issue was selected to be spring-cleaned by a script. More information can be found here.
If anyone thinks this was a mistake and this issue should be reopened, please leave a message below explaining why. Before doing so, please consider reading the CONTRIBUTING file.


Make docker gitea/gitea:v1.16-dev etc refer to the latest build on that branch (#18551)

Backport #18551
(Backporting this will enable this target to create 1.16-dev)
One of the problems with our current docker tagging is that although we
have strict version tags, latest and dev we do not have a way for docker
users to track the current release branch. This PR simply suggests that
we use the 1.x-dev tag for these and we build and push these. This will
give users who want or need unreleased bug fixes the option of tracking
the pre-release version instead of simply jumping to dev.
Signed-off-by: Andrew Thornton<EMAIL_ADDRESS>Co-authored-by: KN4CK3R<EMAIL_ADDRESS>Co-authored-by: Lunny Xiao<EMAIL_ADDRESS>

Also contains backport for #18573


[Request]: Chunker + Chunker CLI

Prerequisites

[X] I have searched all issues/PRs to ensure it has not already been reported or fixed.

Criteria

[X] Reasonably well-known and widely used
[X] A game or a game-related tool
[X] English interface (or at least English documentation)
[X] Latest stable or development version
[X] Full version (i.e. not a trial version)
[X] Fairly standard install (e.g. uses a version-specific download URL, no elaborate pre/post install scripts)

Name
Chunker
Description
Tool to convert Minecraft worlds between Java and Bedrock Edition
Homepage
https://github.com/HiveGamesOSS/Chunker
Download Link(s)
https://github.com/HiveGamesOSS/Chunker/releases/download/1.0.0/Chunker-1.0.0-windows-x64.exe https://github.com/HiveGamesOSS/Chunker/releases/download/1.0.0/chunker-cli-windows-x64.zip
Some Indication of Popularity/Repute
Despite this software becoming open source only 2 days ago, it already has 96 stars. It's also been featured on Minecraft's creator documentation since 2023: https://learn.microsoft.com/en-us/minecraft/creator/documents/chunkeroverview?view=minecraft-bedrock-stable

Feel free to open a pull request for this 🙂

I'm working on this.

Hello. Do you have a preference for how I PR the two manifests? One commit, one PR? Two commits, one PR? Or two commits, two PRs?

~Hello. Do you have a preference for how I PR the two manifests? One commit, one PR? Two commits, one PR? Or two commits, two PRs?~

Note for future reference: Either is fine 🙂


Minor typo on location profile, fixing

Closing this as a follow-on PR will address this and a few other minor formatting issues


Convert the python scripts to methods

Convert the python scripts to methods and test them

The initial approach introduced in #5 ( see file scripts/tsdf_python_interface/load_tsdf_metadata_from_path.py) did not work, so implementing the feature might not be postponed.


fix: audit review fixes

PR is combined from two tasks https://lido.myjetbrains.com/youtrack/issue/LSC-299 https://lido.myjetbrains.com/youtrack/issue/LSC-300, both are audit report notes.
My thoughts(russian) - https://hackmd.io/k_85IFoTS72bxjSnizjWww
Some of the paragraphs does not require any action, some does.
Please read the report, read my notes carefully, especially the ones i leave unchecked

they mean that even though we call CONFIG.load in the remove_validator function, we then call the query_validators in the very scope that calls the CONFIG.load again inside. so they suggest to pass the config to the query_validators instead of making two loads

thank you, fixed


Operator Does Not Exist: UUID = INTEGER When Child and parent table have different id type

PGSync version:
Version: 3.1.0
Postgres version:
PostgreSQL 16.3
Elasticsearch/OpenSearch version:
{
  "name": "opensearch-node1",
  "cluster_name": "opensearch-cluster",
  "cluster_uuid": "zXLzc_O5SQGhuP0lQrhHNg",
  "version": {
    "distribution": "opensearch",
    "number": "2.14.0",
    "build_type": "tar",
    "build_hash": "aaa555453f4713d652b52436874e11ba258d8f03",
    "build_date": "2024-05-09T18:51:35.817208743Z",
    "build_snapshot": false,
    "lucene_version": "9.10.0",
    "minimum_wire_compatibility_version": "7.10.0",
    "minimum_index_compatibility_version": "7.0.0"
  },
  "tagline": "The OpenSearch Project: https://opensearch.org/"
}

Redis version:
Redis version=7.2.5
Python version:
Python 3.10.2
Problem Description:
PGSync crashes when adding a new row to table phone_number
Create following tables in Postgres
CREATE TYPE phone_number_type AS ENUM ('home', 'work', 'cell', 'fax');
CREATE TABLE customers
(
    id                      uuid PRIMARY KEY,
    date_of_birth           date,
    email                   varchar(255),
    first_name              varchar(255),
    last_name               varchar(255)
);
CREATE TABLE phone_numbers
(
    id SERIAL PRIMARY KEY,
    phone_type  phone_number_type,
    phone_number VARCHAR(20),
    extension VARCHAR(10)
);
CREATE TABLE customer_phone_numbers
(
    customer_id uuid REFERENCES customers (id) ON DELETE CASCADE,
    phone_number_id INTEGER REFERENCES phone_numbers (id) ON DELETE CASCADE,
    PRIMARY KEY (customer_id, phone_number_id)
);

When I add a new row to phone_numbers table, pgsync crashes with exception
Exception in poll_redis() for thread Thread-17: (psycopg2.errors.UndefinedFunction) operator does not exist: uuid = integer
LINE 6: WHERE customers_1.id = 1

it will resolve if I run bootstrap command again before running pgsync but it requires run of bootstrap after any new row added to phone_numbers
this is my schema.json file
[
    {
        "database": "test",
        "index": "customer",
        "nodes": {
            "table": "customers",
            "columns": [
                "id",
                "first_name",
                "last_name",
                "date_of_birth",
                "email"
            ],
            "children": [
                {
                    "table": "phone_numbers",
                    "label": "phone_number",
                    "columns": [
                        "id",
                        "phone_number"
                    ],
                    "relationship": {
                        "variant": "scalar",
                        "type": "one_to_many",
                        "through_tables": [
                            "customer_phone_numbers"
                        ]
                    }
                }
            ],
            "transform": {
                "concat": [
                    {
                        "columns": [
                            "first_name",
                            "last_name"
                        ],
                        "destination": "full_name",
                        "delimiter": " "
                    }
                ],
                "mapping": {
                    "date_of_birth": {
                        "type": "date",
                        "format": "strict_date_optional_time || epoch_second"
                    },
                    "full_name": {
                        "type": "text",
                        "fields": {
                            "keyword": {
                                "type": "keyword",
                                "ignore_above": 256
                            },
                            "search_as_you_type": {
                                "type": "search_as_you_type",
                                "max_shingle_size": 3
                            }
                        }
                    },
                    "email": {
                        "type": "text",
                        "fields": {
                            "keyword": {
                                "type": "keyword",
                                "ignore_above": 256
                            },
                            "search_as_you_type": {
                                "type": "search_as_you_type",
                                "max_shingle_size": 3
                            }
                        }
                    }
                }
            }
        }
    }
]

Error Message (if any):
 - public.customers
    - public.phone_number
  [--------------------------------------------------]  0/0    0%
  [--------------------------------------------------]  0/0    0%
 0:00:00.358809 (0.36 sec)
Sync test:customer Xlog: [0] => Db: [0] => Redis: [0] => OpenSearch: [0]...
2024-06-11 22:03:58.520:ERROR:pgsync.search_client: Exception (psycopg2.errors.UndefinedFunction) operator does not exist: uuid = integer
LINE 6: WHERE customers_1.id = 1
                             ^
HINT:  No operator matches the given name and argument types. You might need to add explicit type casts.

 You might need to add explicit type casts.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/homebrew/lib/python3.9/site-packages/pgsync/search_client.py", line 138, in bulk
    self._bulk(
  File "/opt/homebrew/lib/python3.9/site-packages/pgsync/search_client.py", line 194, in _bulk
    for ok, _ in self.parallel_bulk(
  File "/opt/homebrew/lib/python3.9/site-packages/opensearchpy/helpers/actions.py", line 487, in parallel_bulk
    for result in pool.imap(
  File<EMAIL_ADDRESS>line 870, in next
    raise value
  File<EMAIL_ADDRESS>line 125, in worker
    result = (True, func(*args, **kwds))
  File<EMAIL_ADDRESS>line 144, in _helper_reraises_exception
    raise ex
  File<EMAIL_ADDRESS>line 388, in _guarded_task_generation
    for i, x in enumerate(iterable):
  File "/opt/homebrew/lib/python3.9/site-packages/opensearchpy/helpers/actions.py", line 168, in _chunk_actions
    for action, data in actions:
  File "/opt/homebrew/lib/python3.9/site-packages/pgsync/sync.py", line 924, in _payloads
    yield from self.sync(
  File "/opt/homebrew/lib/python3.9/site-packages/pgsync/sync.py", line 966, in sync
    count: int = self.fetchcount(node._subquery)
  File "/opt/homebrew/lib/python3.9/site-packages/pgsync/base.py", line 895, in fetchcount
    return conn.execute(
  File "/opt/homebrew/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1416, in execute
    return meth(
  File "/opt/homebrew/lib/python3.9/site-packages/sqlalchemy/sql/elements.py", line 517, in _execute_on_connection
    return connection._execute_clauseelement(
  File "/opt/homebrew/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1639, in _execute_clauseelement
    ret = self._execute_context(
  File "/opt/homebrew/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1848, in _execute_context
    return self._exec_single_context(
  File "/opt/homebrew/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1988, in _exec_single_context
    self._handle_dbapi_exception(
  File "/opt/homebrew/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 2344, in _handle_dbapi_exception
    raise sqlalchemy_exception.with_traceback(exc_info[2]) from e
  File "/opt/homebrew/lib/python3.9/site-packages/sqlalchemy/engine/base.py", line 1969, in _exec_single_context
    self.dialect.do_execute(
  File "/opt/homebrew/lib/python3.9/site-packages/sqlalchemy/engine/default.py", line 922, in do_execute
    cursor.execute(statement, parameters)
sqlalchemy.exc.ProgrammingError: (psycopg2.errors.UndefinedFunction) operator does not exist: uuid = integer
LINE 6: WHERE customers_1.id = 1
                             ^
HINT:  No operator matches the given name and argument types. You might need to add explicit type casts.

 You might need to add explicit type casts.

Exiting...
/opt/homebrew/Cellar/python@3.9/3.9.15/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/resource_tracker.py:216: UserWarning: resource_tracker: There appear to be 2 leaked semaphore objects to clean up at shutdown
  warnings.warn('resource_tracker: There appear to be %d '

Thanks for the report and detailed steps to reproduce.
This makes things a whole easier.
I've pushed a fix to main branch.

Thanks for fixing the issue, how can I build from main branch?

@toluaina Tried the main branch and the fix is working. any timeline when this fix will be release?


connexion.request.is_json returning false

Description
connexion.request.is_json returning false
Expected behaviour
It should return true
Actual behaviour
The call is returning false
Steps to reproduce
Use swagger-codegen to generate code from any valid swagger doc. Upload the python code to aws lambda service. Hook up api gateway to the lambda as a proxy.
Additional info:
Output of the commands:

python --version
pip show connexion | grep "^Version\:"

Python 3.6.4
Version: 1.1.9

Couple of observations:
1. The same code works perfectly when I run on a local environment.
2. When I upload the code and test on aws, I get this behavior.

Here is a sample code:

import connexion

from swagger_server.models.user import User  # noqa: E501
from swagger_server import util

def update_password(body):  # noqa: E501
    """

     # noqa: E501

    :param body: policy that needs to be applied everywhere
    :type body: dict | bytes

    :rtype: None
    """
    if connexion.request.is_json:
        body = User.from_dict(connexion.request.get_json())  # noqa: E501

        from swagger_server.controllers.update_helloworld import update_helloworld
        res=update_password(body)
        if res['result'] == 'failure':
            res['error_code']=400
            return res, 400
        else:
            return(res)
### the execution skips the if control as it does nto see the request top be json.

I don't get why you use connexion.request directly instead of letting Connexion handle the body parsing and using the resulting dict. Please also provide the Swagger spec and a complete example to reproduce.

Thanks for responding.
To reproduce, you can take the pet store swagger doc:
swagger: "2.0"
info:
  description: "This is a sample server Petstore server.  You can find out more about     Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/).      For this sample, you can use the api key `special-key` to test the authorization     filters."
  version: "1.0.0"
  title: "Swagger Petstore"
  termsOfService: "http://swagger.io/terms/"
  contact:
    email<EMAIL_ADDRESS>  license:
    name: "Apache 2.0"
    url: "http://www.apache.org/licenses/LICENSE-2.0.html"
host: "localhost:5000"
basePath: "/v2"
tags:
- name: "pet"
  description: "Everything about your Pets"
  externalDocs:
    description: "Find out more"
    url: "http://swagger.io"
- name: "store"
  description: "Access to Petstore orders"
- name: "user"
  description: "Operations about user"
  externalDocs:
    description: "Find out more about our store"
    url: "http://swagger.io"
schemes:
- "http"
paths:
  /pet:
    post:
      tags:
      - "pet"
      summary: "Add a new pet to the store"
      description: ""
      operationId: "addPet"
      consumes:
      - "application/json"
      - "application/xml"
      produces:
      - "application/xml"
      - "application/json"
      parameters:
      - in: "body"
        name: "body"
        description: "Pet object that needs to be added to the store"
        required: true
        schema:
          $ref: "#/definitions/Pet"
      responses:
        405:
          description: "Invalid input"
      security:
      - petstore_auth:
        - "write:pets"
        - "read:pets"
    put:
      tags:
      - "pet"
      summary: "Update an existing pet"
      description: ""
      operationId: "updatePet"
      consumes:
      - "application/json"
      - "application/xml"
      produces:
      - "application/xml"
      - "application/json"
      parameters:
      - in: "body"
        name: "body"
        description: "Pet object that needs to be added to the store"
        required: true
        schema:
          $ref: "#/definitions/Pet"
      responses:
        400:
          description: "Invalid ID supplied"
        404:
          description: "Pet not found"
        405:
          description: "Validation exception"
      security:
      - petstore_auth:
        - "write:pets"
        - "read:pets"
  /pet/findByStatus:
    get:
      tags:
      - "pet"
      summary: "Finds Pets by status"
      description: "Multiple status values can be provided with comma separated strings"
      operationId: "findPetsByStatus"
      produces:
      - "application/xml"
      - "application/json"
      parameters:
      - name: "status"
        in: "query"
        description: "Status values that need to be considered for filter"
        required: true
        type: "array"
        items:
          type: "string"
          enum:
          - "available"
          - "pending"
          - "sold"
          default: "available"
        collectionFormat: "multi"
      responses:
        200:
          description: "successful operation"
          schema:
            type: "array"
            items:
              $ref: "#/definitions/Pet"
        400:
          description: "Invalid status value"
      security:
      - petstore_auth:
        - "write:pets"
        - "read:pets"
  /pet/findByTags:
    get:
      tags:
      - "pet"
      summary: "Finds Pets by tags"
      description: "Muliple tags can be provided with comma separated strings. Use         tag1, tag2, tag3 for testing."
      operationId: "findPetsByTags"
      produces:
      - "application/xml"
      - "application/json"
      parameters:
      - name: "tags"
        in: "query"
        description: "Tags to filter by"
        required: true
        type: "array"
        items:
          type: "string"
        collectionFormat: "multi"
      responses:
        200:
          description: "successful operation"
          schema:
            type: "array"
            items:
              $ref: "#/definitions/Pet"
        400:
          description: "Invalid tag value"
      security:
      - petstore_auth:
        - "write:pets"
        - "read:pets"
      deprecated: true
  /pet/{petId}:
    get:
      tags:
      - "pet"
      summary: "Find pet by ID"
      description: "Returns a single pet"
      operationId: "getPetById"
      produces:
      - "application/xml"
      - "application/json"
      parameters:
      - name: "petId"
        in: "path"
        description: "ID of pet to return"
        required: true
        type: "integer"
        format: "int64"
      responses:
        200:
          description: "successful operation"
          schema:
            $ref: "#/definitions/Pet"
        400:
          description: "Invalid ID supplied"
        404:
          description: "Pet not found"
      security:
      - api_key: []
    post:
      tags:
      - "pet"
      summary: "Updates a pet in the store with form data"
      description: ""
      operationId: "updatePetWithForm"
      consumes:
      - "application/x-www-form-urlencoded"
      produces:
      - "application/xml"
      - "application/json"
      parameters:
      - name: "petId"
        in: "path"
        description: "ID of pet that needs to be updated"
        required: true
        type: "integer"
        format: "int64"
      - name: "name"
        in: "formData"
        description: "Updated name of the pet"
        required: false
        type: "string"
      - name: "status"
        in: "formData"
        description: "Updated status of the pet"
        required: false
        type: "string"
      responses:
        405:
          description: "Invalid input"
      security:
      - petstore_auth:
        - "write:pets"
        - "read:pets"
    delete:
      tags:
      - "pet"
      summary: "Deletes a pet"
      description: ""
      operationId: "deletePet"
      produces:
      - "application/xml"
      - "application/json"
      parameters:
      - name: "api_key"
        in: "header"
        required: false
        type: "string"
      - name: "petId"
        in: "path"
        description: "Pet id to delete"
        required: true
        type: "integer"
        format: "int64"
      responses:
        400:
          description: "Invalid ID supplied"
        404:
          description: "Pet not found"
      security:
      - petstore_auth:
        - "write:pets"
        - "read:pets"
  /pet/{petId}/uploadImage:
    post:
      tags:
      - "pet"
      summary: "uploads an image"
      description: ""
      operationId: "uploadFile"
      consumes:
      - "multipart/form-data"
      produces:
      - "application/json"
      parameters:
      - name: "petId"
        in: "path"
        description: "ID of pet to update"
        required: true
        type: "integer"
        format: "int64"
      - name: "additionalMetadata"
        in: "formData"
        description: "Additional data to pass to server"
        required: false
        type: "string"
      - name: "file"
        in: "formData"
        description: "file to upload"
        required: false
        type: "file"
      responses:
        200:
          description: "successful operation"
          schema:
            $ref: "#/definitions/ApiResponse"
      security:
      - petstore_auth:
        - "write:pets"
        - "read:pets"
  /store/inventory:
    get:
      tags:
      - "store"
      summary: "Returns pet inventories by status"
      description: "Returns a map of status codes to quantities"
      operationId: "getInventory"
      produces:
      - "application/json"
      parameters: []
      responses:
        200:
          description: "successful operation"
          schema:
            type: "object"
            additionalProperties:
              type: "integer"
              format: "int32"
      security:
      - api_key: []
  /store/order:
    post:
      tags:
      - "store"
      summary: "Place an order for a pet"
      description: ""
      operationId: "placeOrder"
      produces:
      - "application/xml"
      - "application/json"
      parameters:
      - in: "body"
        name: "body"
        description: "order placed for purchasing the pet"
        required: true
        schema:
          $ref: "#/definitions/Order"
      responses:
        200:
          description: "successful operation"
          schema:
            $ref: "#/definitions/Order"
        400:
          description: "Invalid Order"
  /store/order/{orderId}:
    get:
      tags:
      - "store"
      summary: "Find purchase order by ID"
      description: "For valid response try integer IDs with value >= 1 and <= 10.         Other values will generated exceptions"
      operationId: "getOrderById"
      produces:
      - "application/xml"
      - "application/json"
      parameters:
      - name: "orderId"
        in: "path"
        description: "ID of pet that needs to be fetched"
        required: true
        type: "integer"
        maximum: 10.0
        minimum: 1.0
        format: "int64"
      responses:
        200:
          description: "successful operation"
          schema:
            $ref: "#/definitions/Order"
        400:
          description: "Invalid ID supplied"
        404:
          description: "Order not found"
    delete:
      tags:
      - "store"
      summary: "Delete purchase order by ID"
      description: "For valid response try integer IDs with positive integer value.         Negative or non-integer values will generate API errors"
      operationId: "deleteOrder"
      produces:
      - "application/xml"
      - "application/json"
      parameters:
      - name: "orderId"
        in: "path"
        description: "ID of the order that needs to be deleted"
        required: true
        type: "integer"
        minimum: 1.0
        format: "int64"
      responses:
        400:
          description: "Invalid ID supplied"
        404:
          description: "Order not found"
  /user:
    post:
      tags:
      - "user"
      summary: "Create user"
      description: "This can only be done by the logged in user."
      operationId: "createUser"
      produces:
      - "application/xml"
      - "application/json"
      parameters:
      - in: "body"
        name: "body"
        description: "Created user object"
        required: true
        schema:
          $ref: "#/definitions/User"
      responses:
        default:
          description: "successful operation"
  /user/createWithArray:
    post:
      tags:
      - "user"
      summary: "Creates list of users with given input array"
      description: ""
      operationId: "createUsersWithArrayInput"
      produces:
      - "application/xml"
      - "application/json"
      parameters:
      - in: "body"
        name: "body"
        description: "List of user object"
        required: true
        schema:
          type: "array"
          items:
            $ref: "#/definitions/User"
      responses:
        default:
          description: "successful operation"
  /user/createWithList:
    post:
      tags:
      - "user"
      summary: "Creates list of users with given input array"
      description: ""
      operationId: "createUsersWithListInput"
      produces:
      - "application/xml"
      - "application/json"
      parameters:
      - in: "body"
        name: "body"
        description: "List of user object"
        required: true
        schema:
          type: "array"
          items:
            $ref: "#/definitions/User"
      responses:
        default:
          description: "successful operation"
  /user/login:
    get:
      tags:
      - "user"
      summary: "Logs user into the system"
      description: ""
      operationId: "loginUser"
      produces:
      - "application/xml"
      - "application/json"
      parameters:
      - name: "username"
        in: "query"
        description: "The user name for login"
        required: true
        type: "string"
      - name: "password"
        in: "query"
        description: "The password for login in clear text"
        required: true
        type: "string"
      responses:
        200:
          description: "successful operation"
          schema:
            type: "string"
          headers:
            X-Rate-Limit:
              type: "integer"
              format: "int32"
              description: "calls per hour allowed by the user"
            X-Expires-After:
              type: "string"
              format: "date-time"
              description: "date in UTC when token expires"
        400:
          description: "Invalid username/password supplied"
  /user/logout:
    get:
      tags:
      - "user"
      summary: "Logs out current logged in user session"
      description: ""
      operationId: "logoutUser"
      produces:
      - "application/xml"
      - "application/json"
      parameters: []
      responses:
        default:
          description: "successful operation"
  /user/{username}:
    get:
      tags:
      - "user"
      summary: "Get user by user name"
      description: ""
      operationId: "getUserByName"
      produces:
      - "application/xml"
      - "application/json"
      parameters:
      - name: "username"
        in: "path"
        description: "The name that needs to be fetched. Use user1 for testing. "
        required: true
        type: "string"
      responses:
        200:
          description: "successful operation"
          schema:
            $ref: "#/definitions/User"
        400:
          description: "Invalid username supplied"
        404:
          description: "User not found"
    put:
      tags:
      - "user"
      summary: "Updated user"
      description: "This can only be done by the logged in user."
      operationId: "updateUser"
      produces:
      - "application/xml"
      - "application/json"
      parameters:
      - name: "username"
        in: "path"
        description: "name that need to be updated"
        required: true
        type: "string"
      - in: "body"
        name: "body"
        description: "Updated user object"
        required: true
        schema:
          $ref: "#/definitions/User"
      responses:
        400:
          description: "Invalid user supplied"
        404:
          description: "User not found"
    delete:
      tags:
      - "user"
      summary: "Delete user"
      description: "This can only be done by the logged in user."
      operationId: "deleteUser"
      produces:
      - "application/xml"
      - "application/json"
      parameters:
      - name: "username"
        in: "path"
        description: "The name that needs to be deleted"
        required: true
        type: "string"
      responses:
        400:
          description: "Invalid username supplied"
        404:
          description: "User not found"
securityDefinitions:
  petstore_auth:
    type: "oauth2"
    authorizationUrl: "http://petstore.swagger.io/oauth/dialog"
    flow: "implicit"
    scopes:
      write:pets: "modify pets in your account"
      read:pets: "read your pets"
  api_key:
    type: "apiKey"
    name: "api_key"
    in: "header"
definitions:
  Order:
    type: "object"
    properties:
      id:
        type: "integer"
        format: "int64"
      petId:
        type: "integer"
        format: "int64"
      quantity:
        type: "integer"
        format: "int32"
      shipDate:
        type: "string"
        format: "date-time"
      status:
        type: "string"
        description: "Order Status"
        enum:
        - "placed"
        - "approved"
        - "delivered"
      complete:
        type: "boolean"
        default: false
    xml:
      name: "Order"
  Category:
    type: "object"
    properties:
      id:
        type: "integer"
        format: "int64"
      name:
        type: "string"
    xml:
      name: "Category"
  User:
    type: "object"
    properties:
      id:
        type: "integer"
        format: "int64"
      username:
        type: "string"
      firstName:
        type: "string"
      lastName:
        type: "string"
      email:
        type: "string"
      password:
        type: "string"
      phone:
        type: "string"
      userStatus:
        type: "integer"
        format: "int32"
        description: "User Status"
    xml:
      name: "User"
  Tag:
    type: "object"
    properties:
      id:
        type: "integer"
        format: "int64"
      name:
        type: "string"
    xml:
      name: "Tag"
  Pet:
    type: "object"
    required:
    - "name"
    - "photoUrls"
    properties:
      id:
        type: "integer"
        format: "int64"
      category:
        $ref: "#/definitions/Category"
      name:
        type: "string"
        example: "doggie"
      photoUrls:
        type: "array"
        xml:
          name: "photoUrl"
          wrapped: true
        items:
          type: "string"
      tags:
        type: "array"
        xml:
          name: "tag"
          wrapped: true
        items:
          $ref: "#/definitions/Tag"
      status:
        type: "string"
        description: "pet status in the store"
        enum:
        - "available"
        - "pending"
        - "sold"
    xml:
      name: "Pet"
  ApiResponse:
    type: "object"
    properties:
      code:
        type: "integer"
        format: "int32"
      type:
        type: "string"
      message:
        type: "string"
externalDocs:
  description: "Find out more about Swagger"
  url: "http://swagger.io"

I installed swagger-codegen via brew install swagger-codegen. Note that you need to have java 8 installed prior.
Generate the code via swagger-codegen generate -i swagger.yml -l python-flask -o swaggertemp
Under swaggertemp/swagger_server/controllers, you will see the controller file
A small snippet from the pet_controller.py
import connexion
import six

from swagger_server.models.api_response import ApiResponse  # noqa: E501
from swagger_server.models.pet import Pet  # noqa: E501
from swagger_server import util

def add_pet(body):  # noqa: E501
    """Add a new pet to the store

     # noqa: E501

    :param body: Pet object that needs to be added to the store
    :type body: dict | bytes

    :rtype: None
    """
    if connexion.request.is_json:
        body = Pet.from_dict(connexion.request.get_json())  # noqa: E501
    return 'do some magic!'

def delete_pet(petId, api_key=None):  # noqa: E501
    """Deletes a pet

     # noqa: E501

    :param petId: Pet id to delete
    :type petId: int
    :param api_key:
    :type api_key: str

    :rtype: None
    """
    return 'do some magic!'

The problem is in the main.py generated by swaggerhub. The following statement:
app = connexion.App(name, specification_dir='./swagger/')
should read as:
app = connexion.FlaskApp(name, specification_dir='./swagger/')
which is why the connexion object in the controller is a null.

It sounds like this is a bug with swagger-codegen. Please re-open if that's not the case!


Blog app - Add forms

Description

Create a method called current_user in your ApplicationController to make current user data available to all controllers.

It will return the first user from the database.
Don't worry about proper authentication at this time. You will add it in the upcoming projects.

Create forms to perform the following functions:

Creates a Post on behalf of the current_user (use the method that you created in your ApplicationController).
Create a comment on behalf of the current_user (use the method that you created in your ApplicationController).

Allow Users to add likes to Posts.

Thanks @zainsadaqat for the review


LE Audio: Cannot set Media Player Name and Track Title

Describe the bug
Two GMCS Server role test cases require updating values of Media Player Name characteristic or Track Title characteristic. Currently Media Player is initialized with hardcoded Media Player Name and various groups of tracks. There is no API that allows changing values of these characteristics.
To Reproduce
Can be reproduced with AutoPTS.
Expected behavior
API should allow to change values of Media Player Name and Track Title characteristic.
Impact
Test case verdict is inconclusive.
Logs and console output
logs.zip
Environment (please complete the following information):

OS: Windows 11
Toolchain: Zephyr SDK 0.16.3
#64377

Modified this to be an enhancement as it is not a bug, simply a missing feature.

I do not think I agree to this request.
A media player will have a given name (e.g. Spotify).  I can not see that it makes sense to have an API to change that name.  Ditto for the Icon Object ID and the Icon URL, which also are given for a given player.
There are test commands to trigger callbacks for notifying that Player Name, Icon Object ID and Icon URL have been changed, though - see mpl.c in the shell commands.  That used to be sufficient for testing.
What could make sense is to extend the current GMCS implementation to support multiple players.  In that case, there is a need to register the name of the new player.  (But that would also imply having a complete set of all the other characteristics, or to switch all the characteristics over to new values.)  This goes along with implementing proper MCS support - there may be multiple players with separate instances, GMCS will point to one of them (the "current" one).
The player name is only "soft" hardocded - it is a Kconfig option.
The groups and tracks are hard coded, as the media player implementation is so far only a simple mock-up.

As for Track Title: Is the request to change the title of the track (that is not specified)?  Or is it to change to another track with another title?
Track Title, as Player Name, are Read only.  The server can not expect to change them.

@asbjornsabo the instruction in MMI is: "Please update Media Player Name/Track Title characteristic with value whose length is greater than the (ATT_MTU-3). Click OK when it is ready.
Test specification: "The Upper Tester commands the IUT to update the characteristic specified by the Characteristic UUID referenced in Table 4.19 (media player name, track title) with a different value whose length is greater than the (ATT_MTU-3)."

OK - now I see.
These tests are for setting "oversize" values and changing the name while in a long read.
I guess that must be added, but it should be with the other "test" functions - this is not something that should be in the public API.

I can not see that it makes sense to have an API to change that name.

We may not see an immediate usecase for it, but that doesn't mean it isn't there. In any case, the characteristic is (optionally) notifiable, which indicates that it can be notified, and thus changed.
One example of where this may happen, is something I see in my Linux installation. When I have some media playing from my Firefox browser, it will have the name similar to "Firefox - Youtube" or "Firefox - Spotify" - So even though Firefox is technically the media service, the underlying service may change, and thus the service name changes.