cannot compile generated scala code

After generating scala code from my database schema I get 94 compile errors. There are really only two different types of errors.
The first is this:
[ERROR] /home/khoran/development/web_services/target/generated-sources/scala/net/globalrecordings/davical/schema/PgLargeobject.scala:14: error: not found: type byte
[INFO]   var data: Array[byte] = _
[INFO]                   ^
[ERROR] /home/khoran/development/web_services/target/generated-sources/scala/net/globalrecordings/davical/schema/PgToast11454.scala:14: error: not found: type byte
[INFO]   var chunkData: Array[byte] = _
[INFO]                        ^
[ERROR] /home/khoran/development/web_services/target/generated-sources/scala/net/globalrecordings/davical/schema/PgToast11459.scala:14: error: not found: type byte
[INFO]   var chunkData: Array[byte] = _
[INFO]                        ^
[ERROR] /home/khoran/development/web_services/target/generated-sources/scala/net/globalrecordings/davical/schema/PgToast11464.scala:14: error: not found: type byte
[INFO]   var chunkData: Array[byte] = _
This looks like its getting java and scala confused, as scala should be using "Byte". The second error looks like:
[ERROR] /home/khoran/development/web_services/target/generated-sources/scala/net/globalrecordings/davical/schema/QCaldavData.scala:56: error: not found: value Arrays
[INFO]   val _caldavExists: ForeignKey[CalendarItem] = createInvForeignKey(Arrays.asList(userNo, davName), Arrays.asList("user_no", "dav_name"))
Which looks like it just forgot to import the "Arrays" class from java.  Here is my relevant maven config:

com.mysema.querydsl
querydsl-maven-plugin
${querydsl.version}
        <executions>
            <execution>
                <goals>
                    <goal>export</goal>
                </goals>
            </execution>
        </executions>

        <configuration>
          <jdbcDriver>org.postgresql.Driver</jdbcDriver>
          <jdbcUrl> jdbc:postgresql://postgres.us.grn/davical</jdbcUrl>

          <jdbcUser>davical_app</jdbcUser>
          <jdbcPassword>xxxxx</jdbcPassword>

          <packageName>net.globalrecordings.davical.schema</packageName>
          <!--<targetFolder>${project.basedir}/src/main/scala</targetFolder>-->
          <targetFolder>${project.basedir}/target/generated-sources/scala</targetFolder>
          <exportBeans>true</exportBeans>
          <createScalaSources>true</createScalaSources>
        </configuration>
        <dependencies>
          <dependency>
                <groupId>postgresql</groupId>
                <artifactId>postgresql</artifactId>
                <version>9.0-801.jdbc4</version>
          </dependency>
          <dependency>
            <groupId>com.mysema.querydsl</groupId>
            <artifactId>querydsl-scala</artifactId>
            <version>${querydsl.version}</version>
          </dependency>
          <dependency>
            <groupId>org.scala-lang</groupId>
            <artifactId>scala-library</artifactId>
            <version>${scala.version}</version>
         </dependency>
       </dependencies>
      </plugin>

I can actually do without all the pg_* stuff, which leaves the Arrays.asList errors. After further investigation, this is actually two problems. If I manually add "import java.util.Arrays', then that error goes away, but it turns out that neither "createInvForeignKey" nor "createInvForeignKey" is defined for lists.  This was easy enough to fix by adding the two functions into RelationalPathImpl:
def createForeignKey[F](local: JList[Path[]], foreign: JList[String]) = {
val foreignKey = new ForeignKey[F](this, local, foreign)
foreignKeys.add(foreignKey)
foreignKey
}
def createInvForeignKey[F](local: JList[Path[]], foreign: JList[String]) = {
val foreignKey = new ForeignKey[F](this, local, foreign)
inverseForeignKeys.add(foreignKey)
foreignKey
}
since ForeignKey is defined for lists. The call still needs a cast to work though, not sure about that. I haven't actually used this to see if its correct, I just got it to compile.
Another error I found after this is :
[INFO] Compiling 157 source files to /home/khoran/development/web_services/target/classes at<PHONE_NUMBER>165
[ERROR] /home/khoran/development/web_services/src/main/scala/net/globalrecordings/davical/schema/QRruleParts.scala:42: error: overriding lazy value count in trait SimpleExpression of type com.mysema.query.scala.NumberExpression[java.lang
.Long];
[INFO]  value count needs `override' modifier
[INFO]   val count = createNumberInteger
[INFO]       ^
In this case the variable "count" is actually already defined in an inherited class ("SimpleExpression"). Not sure how to fix this one.
I'm using version 2.3.0.  Thanks for any help.

Thanks for the detailed bug report! These issues have now been fixed. I just deployed a new version of 2.3.0.BUILD-SNAPSHOT to http://source.mysema.com/maven2/snapshots/

That fixed everything! Thanks. I ran it on a much larger database now (generated 8811 files! ) and got some new errors, though I'm not sure you need to fix them. Basically, someone managed to create some column names with spaces in them (how I don't know), which generated variable names with spaces in them, and that didn't work too well:
[INFO] Compiling 8811 source files to /home/khoran/development/web_services/target/classes at<PHONE_NUMBER>067
[ERROR] /home/khoran/development/web_services/src/main/scala/net/globalrecordings/gr_database/CountriesView.scala:22: error: illegal start of simple pattern
[INFO]   var iSO three letter code: String = _
[INFO]                            ^
[ERROR] /home/khoran/development/web_services/src/main/scala/net/globalrecordings/gr_database/CountriesView.scala:24: error: '=' expected but ';' found.
[INFO]   var iSO two letter code: String = _
[INFO] ^
[ERROR] /home/khoran/development/web_services/src/main/scala/net/globalrecordings/gr_database/CountriesView.scala:24: error: illegal start of simple pattern
[INFO]   var iSO two letter code: String = _
[INFO]                          ^
[ERROR] /home/khoran/development/web_services/src/main/scala/net/globalrecordings/gr_database/CountriesView.scala:26: error: '=' expected but ';' found.
[INFO]   var latitudeOfCenter: java.math.BigDecimal = _
[INFO] ^
[ERROR] /home/khoran/development/web_services/src/main/scala/net/globalrecordings/gr_database/QCountriesView.scala:30: error: illegal start of simple pattern
[INFO]   val iSO three letter code = createString("ISO three letter code")
[INFO]                             ^
[ERROR] /home/khoran/development/web_services/src/main/scala/net/globalrecordings/gr_database/QCountriesView.scala:32: error: '=' expected but ';' found.
[INFO]   val iSO two letter code = createString("ISO two letter code")
[INFO] ^
[ERROR] /home/khoran/development/web_services/src/main/scala/net/globalrecordings/gr_database/QCountriesView.scala:32: error: illegal start of simple pattern
[INFO]   val iSO two letter code = createString("ISO two letter code")
[INFO]                           ^
[ERROR] /home/khoran/development/web_services/src/main/scala/net/globalrecordings/gr_database/QCountriesView.scala:34: error: '=' expected but ';' found.
[INFO]   val latitudeOfCenter = createNumberjava.math.BigDecimal
[INFO] ^
[ERROR] 8 errors found
But, as I intend to rename these columns anyway, and I'm not sure if that's even legal in SQL, it might not be worth fixing.  Thanks for your quick help!

I created a new ticket for the spaces issue :
https://github.com/mysema/querydsl/issues/89
On Thu, Jan 26, 2012 at 11:11 PM, kevin <
<EMAIL_ADDRESS>
wrote:

That fixed everything! Thanks. I ran it on a much larger database now
(generated 8811 files! ) and got some new errors, though I'm not sure you
need to fix them. Basically, someone managed to create some column names
with spaces in them (how I don't know), which generated variable names with
spaces in them, and that didn't work too well:
[INFO] Compiling 8811 source files to
/home/khoran/development/web_services/target/classes at<PHONE_NUMBER>067
[ERROR]
/home/khoran/development/web_services/src/main/scala/net/globalrecordings/gr_database/CountriesView.scala:22:
error: illegal start of simple pattern
[INFO]   var iSO three letter code: String = _
[INFO]                            ^
[ERROR]
/home/khoran/development/web_services/src/main/scala/net/globalrecordings/gr_database/CountriesView.scala:24:
error: '=' expected but ';' found.
[INFO]   var iSO two letter code: String = _
[INFO] ^
[ERROR]
/home/khoran/development/web_services/src/main/scala/net/globalrecordings/gr_database/CountriesView.scala:24:
error: illegal start of simple pattern
[INFO]   var iSO two letter code: String = _
[INFO]                          ^
[ERROR]
/home/khoran/development/web_services/src/main/scala/net/globalrecordings/gr_database/CountriesView.scala:26:
error: '=' expected but ';' found.
[INFO]   var latitudeOfCenter: java.math.BigDecimal = _
[INFO] ^
[ERROR]
/home/khoran/development/web_services/src/main/scala/net/globalrecordings/gr_database/QCountriesView.scala:30:
error: illegal start of simple pattern
[INFO]   val iSO three letter code = createString("ISO three letter code")
[INFO]                             ^
[ERROR]
/home/khoran/development/web_services/src/main/scala/net/globalrecordings/gr_database/QCountriesView.scala:32:
error: '=' expected but ';' found.
[INFO]   val iSO two letter code = createString("ISO two letter code")
[INFO] ^
[ERROR]
/home/khoran/development/web_services/src/main/scala/net/globalrecordings/gr_database/QCountriesView.scala:32:
error: illegal start of simple pattern
[INFO]   val iSO two letter code = createString("ISO two letter code")
[INFO]                           ^
[ERROR]
/home/khoran/development/web_services/src/main/scala/net/globalrecordings/gr_database/QCountriesView.scala:34:
error: '=' expected but ';' found.
[INFO]   val latitudeOfCenter =
createNumberjava.math.BigDecimal
[INFO] ^
[ERROR] 8 errors found
But, as I intend to rename these columns anyway, and I'm not sure if
that's even legal in SQL, it might not be worth fixing.  Thanks for your
quick help!

Reply to this email directly or view it on GitHub:
https://github.com/mysema/querydsl/issues/86#issuecomment-3676737

--
Timo Westkmper
Mysema Oy
+358 (0)40 591 2172
www.mysema.com

I'll close this when it's released


[W7.7][T17-B2] MedNus

v1.3 Updates

Developer & User Guide Edits
Stricter bloodtype command input regex
Natural Language Processing using Putty for Appointment Dates
All command word input are changed to lower case such that its case insensitive
Edit command now supports remarks
Add command only need name for add
Right command shortcut - Supports remark, date and works for edit
v1.3 List Package https://github.com/CS2103AUG2017-T17-B2/main/pull/124

v1.2 Updates

Bug fixes
Alternating shades for each person's panel
7 New Keyboard Shortcuts
Appointment Feature
List by bloodtype command

v1.1 Updates

Portfolios added
README.adoc Completed
Bloodtype class added
Toggle tagcolor mode
Remark Function
List By Tags feature implemented
MedNus New Logo and UI Theme

v1.0 Updates

DeveloperGuide.adoc - Updated repoURL, User Stories, Use Cases, NFRs, Glossary, Product Surveys.
UserGuide.adoc - Updated repoURL, Added Logic Enhancement shorthand commands
Storage Enhancement (Implemented Back-up Storage)
Model Enhancement (Implemented deleteTag)
UI Enhancement (Implemented Different Color for tags)
Logic Enhancement (Implemented shorthand equivalent for ten commands)
Input Command Error Style Change

@Jeremylsw @rushan-khor @ErnestOYH @EricLoh
So there isn't a formal PR review for this iteration so I will just leave some quick comments:
Dev Guide
Perhaps 4.6. Enhancement: Set tag color could be populated with a short description on how it was implemented.
Perhaps Appendix A can be reworded?
Remember to jar up your project for iteration v1.4.
Note that in v1.4 there are additional requirements like collate. (Remember to tag properly. Tag the commit with the collated folder)


Feature Request: Add Parameter to Control Tooltip Dismissal Behavior

Use case
Description: I would like to propose an enhancement to the existing Tooltip widget in Flutter to provide developers with the ability to control the dismissal behavior of tooltips more effectively.
Current Behavior: The default behavior of the Tooltip widget is that it remains visible even when the mouse hovers over the tooltip itself. This can lead to situations where the tooltip persists longer than desired, especially when the user moves the cursor from the target widget directly to the tooltip.
Proposal
Proposed Enhancement: Add a parameter to the Tooltip widget that allows developers to specify whether the tooltip should dismiss immediately when the mouse leaves the target widget, even if the mouse enters the tooltip. This could be achieved by introducing a boolean parameter such as dismissOnHoverExit:
Tooltip(
  message: 'This is a tooltip',
  dismissOnHoverExit: true, // New parameter to control dismissal behavior
)

Use Case: This enhancement would be particularly useful for applications where tooltips are used for short instructions or contextual help, improving user experience by avoiding unnecessary delays in tooltip dismissal.
Example Scenario: When the user hovers over a button with a tooltip, the tooltip appears as expected. However, if the user then moves the mouse away from the button and onto the tooltip, the tooltip should disappear immediately rather than remaining visible.
Conclusion: I believe that this enhancement would provide developers with greater flexibility in how tooltips are used within their applications, ultimately leading to a better user experience. Thank you for considering this feature request!

Thanks for the report @stephane-archer
Can you take a look at below similar issues to see if they resemble your case or not ?
https://github.com/flutter/flutter/issues/156312
https://github.com/flutter/flutter/issues/126787

No it's not, (the first one would be great too)

@stephane-archer This seems a reasonable feature request.
If you can provide some examples of non-Flutter tooltips working this way it might help promoting this feature request.
For instance, directly inside GitHub UI, the tooltips works similarly to Flutter (stay visible when hovered, same for gmail). But on native Ubuntu apps it seems that the tooltips behavior is the one you are asking for, same for Discord app.

@darshankawar can you re-open this issue? the problem has been described...


popup width problem

I don't know what happens but the pop-up windows change and now is too small to be useful, I try manually but only height change.
There is a way to fix it? maybe a css file?
thanks for helping

Sorry but you must report it to the extension and not to the archive, thanks.


add omitempty to storageopts

https://github.com/docker/engine-api/pull/151 broke backward compat, since StorageOpt is unused most of a time, let's put an omitempty to prevent unmarshalling error.
ping @alexmavr

LGTM, however if the struct is used wouldn't the unmarshalling error still occur?

@alexmavr true but fixing this takes more time, I think this one would help us in the meantime.

+1, thanks again for your attention on this

LGTM
This is the right fix.

LGTM 🐮


What is this weird error?

What is this weird error?
When I run rasa x, I get this error printed on terminal:
[2019-08-23 xx:xx:xx +0000] [2693] [ERROR] Exception occurred while handling uri: unknown NoneType: None
No more, no less

Thanks for the question, our Github issue board is for bugs and feature requests only, though 😕
Please ask this question in the forum✨
If you were describing a bug, please create a report and fill out the template


(Request) Allow changing the interact Button for each scene-type

Is your feature request related to a problem? Please describe.
People like changing around their control scheme. gmarty has created a pull request that swaps the run and jump buttons for platformer mode to fit with games like Super Mario Land 2 #646 , but the interact button is independent from the run and jump buttons. Changing these platformer buttons calls into question how the "interact" button should be handled.
I see 1 of 4 possible outcomes that could all be desired from changing around the interact buttons:
1/4: Interact is tied to run
Benefits: Players won't talk to actors by accident when they jump.
Drawbacks: Any scripts associated with "A" in non-platformer types need to be removed and re-attached for any platformer scenes, and there is no (clear) way to determine scene type through scripts.
This situation is what I want to prevent if we decide to swap (or allow swapping) the platformer buttons.
2/4: Interact is tied to jump
Benefits: "A" is reliably the "interact" button in a SML2-style button layout. Desirable for games without jumping.
Drawbacks: Players are stopped from jumping if they interact with an actor by accident.
3/4: Interact is tied to start or select
Benefits: No button conflicts.
Drawbacks: Non-standard.
4/4: Interact is tied to up or down
Benefits: Games without ladders can incorporate kirby-style doors. Games with ladders could include a proximity check on ladders for more complicated ladder gameplay.
Drawbacks: Crosses over functionality with ladders, may cause other unintended issues?
Describe the solution you'd like
Expose the button used for hit_actor in Platformer (and perhaps other scene types) as an option in the Settings menu.

This but with the above buttons mentioned. A "reset to default" button would also be nice for each scene type.
Here's the bit of code that needs to be exposed to the editor: INPUT_A_PRESSED
In this section of Platformer.c:
if (grounded && INPUT_A_PRESSED) {
    if (player.dir.x == 1) {
      hit_actor = ActorAtTile(tile_x + 2, tile_y, TRUE);
    } else {
      hit_actor = ActorAtTile(tile_x - 1, tile_y, TRUE);
    }
    if (hit_actor && (hit_actor != NO_ACTOR_COLLISON)) {
      ScriptStart(&actors[hit_actor].events_ptr);
    }
  }

Describe alternatives you've considered
Swapping the jump button / interact button can technically be done through "Attach Script to Button" but it's not immediately apparent that this event can swap button functionality in an unintended way.
Additional context
Add any other context or screenshots about the feature request here.

Thanks @DeerTears for this detailed break down of all the different options here. I've been doing a bit of testing out different games to see what the precedent is, the hope is this could just be fixed with a sensible default value.
So far most of the platform games I'm trying either don't have an interact button or those that do mostly use Up. We could do that (and I'd actually considered it pre releasing the first beta) but then it would be inconsistent with the other scene types.
I'm not completely against making this configurable but we just need to be careful as replacing those hard coded values with anything dynamic can both affect performance and make the code more difficult to maintain.
As an alternative maybe we could do this:

Like in #646 switch B & A on Platform scenes so B is Run and A is Jump (matching most platform games on the Game Boy)
Make Up the default interact button for Platform scenes
Add a new event "Action: Player Interact" which when combined with "Attach Script to Button" would allow replacing either "B" if you don't want to allow running, or "A" if you don't want to allow jumping (or I guess Down if you wanted also) with the interact action

I'll continue to have a think about what to do here but it's definitely a tricky one to get right.

We got this now \o/ ty


MAPL/ESMA_cmake resources

The MAPL package doubule-uses ESMA_cmake resources for 2.22.x and 2.23.x. For the second esma_cmake resource block, when="@2.22.0:" should be when="@2.22.0:2.23" or something to that effect.

Oops. Yeah. Probably true. Probably be tomorrow before I can get to this and test, but you can probably do it quickly!

@AlexanderRichert-NOAA I think I changed this in my NOAA-EMC tracking spack PR with this commit:
https://github.com/NOAA-EMC/spack/pull/241/commits/0966f016bdc090ee608f0a152efbd90625bd3728
Note: Fun times, the FindESMF.cmake file might actually go back in to MAPL! Why? Well, if I want to build MAPL outside of spack but using spack as libraries, the file is nigh-impossible to find. Inside spack's build system, spack knows where it is from the ESMF recipe, but I just cannot figure out how to get that information outside of spack in a simple way...and just putting it in MAPL solves the issue.
And I guess that means these lines can stop being needed...

For now, keep it in as things work with it. It's my hope that "soon" it isn't needed for MAPL-as-Spack-Library. But spack is an odd beast sometimes...


Update fluent_validation to 9.2.0.

Update fluent validation to 9.2.0.

Force push messes up travis ci progress reporting. Please do another commit, without git push.

Where is the problem?

@ryjones It seems Travis isn't always reporting back the status. I tried restarting the build on some occasions, but it didn't work. Can you help us with this?

Do you want me to merge the change?

Do you want me to merge the change?

Yes please

@tmarkovski now all should be fine.


Add new service type: 'ProxyRegex' - Wish to proxy/route (not redirect) wildcards to wildcards.

Do you want to request a feature or report a bug?
feature

Feature
What did you expect to see?
Although I can create a router that will REDIRECT/301 *.domain.com to *.anotherdomain.com I need/wish to proxy outside connections to internal endpoints.
I understand that adding this logic to a service might break the design pattern but perhaps the service could simply proxy the target URL as massaged by middle wares - i.e. the service would have no parameters.
My current workarounds include writing a cron to create a file.yml config/map->loadBalancer or perhaps ngix container.
Thanks!

Hi,
We're having trouble understanding what you're trying to achieve.
Could you please detail more and/or add a full example of the setup and the behaviour you would like to see?

Thanks, I wish to route external hosts/paths to internal hosts/paths, so .outsidedomain.com/ would route to .insidedomain.com/.  Essentially a forward proxy but only for specific/fixed routes.  There will be hundreds of s.

We still do not understand. Why can't this be achieved with a HostRegex rule?
https://docs.traefik.io/v2.0/routing/routers/#rule

Thanks - that would be able to match the incoming route, then run it through some middlewares or send it to a service but it seems that the only service is loadBalancer and that it only proxies to a static host, I would like something like the RegEx/Replacement for that service, or that the service would target a server in a header.  I'm trying to expose hundreds of IOT devices that show up on a VPN to outside world https.

Ok, I think we got it.
If we understood you correctly, it seems like you would like to potentially dynamically create a new service depending on some request parameter (say, its intended destination). That is pretty different to the various ways Traefik can create routes, since at the end of the day, the routes (and services) are created by definitions coming from some configuration elements (even if these configuration elements are dynamic ones, e.g. they come from some container label), which is pretty different from what you propose.
In your proposal, the requests themselves are pretty much the configuration element, and you could potentially end up creating one different router/service for each incoming request, which seems pretty dangerous.
In addition, we think it could pave the road for some serious security exploits, and let attackers create services/routers that you did not anticipate with some clever forging of requests.
However, we think what you're trying to achieve might be doable if you complement traefik with some additional glue of your own that would be in charge of creating the configuration elements that would lead to the eventual creation of the services/routers. You'd get what you want, but you'd stay more in control of what's happening. For example, it seems that the reporter in this issue: https://github.com/containous/traefik/issues/6591 was doing something in a similar vein.

I disagree - we would of course filter requests with router rules, re-route to a machine with a regex/replacement, that hose name happens to be a guid, if a call made it to our vpn devices they would still need to be properly formed plus have an auth token, this is safer than forward proxies which are common - please reconsider.  Your design already searches providers like docker/k8... Why not random/variable/regex?


Get ortools_vendor using ament_vendor and building on build.ros2.org

PR - https://github.com/Fields2Cover/ortools_vendor/pull/3

https://build.ros2.org/job/Ibin_uJ64__ortools_vendor__ubuntu_jammy_amd64__binary/
Seems like its not picking up the patch.

Apparently ROS2 hasn't merged those changes yet. I'll tell you again once
it has failed with the new changes. They usually take 1-2 days for merging
El lun., 10 jun. 2024 10:55, aosmw @.***> escribió:

https://build.ros2.org/job/Ibin_uJ64__ortools_vendor__ubuntu_jammy_amd64__binary/
Seems like its not picking up the patch.
—
Reply to this email directly, view it on GitHub
https://github.com/Fields2Cover/ortools_vendor/issues/4#issuecomment-2157751557,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AA5R5PW6COGK5ENOU7FN5DDZGVSXJAVCNFSM6AAAAABJB3KKZCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJXG42TCNJVG4
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

Ahh ok - here is the offending/unexpected line.  17:12:57 [ 42%] No patch step for 'ortools_vendor
BTW - While waiting for the build farm to come up I also played with https://github.com/canonical/colcon-in-container where it built a debian package successfully.

It works!!!!!!!! https://build.ros2.org/job/Rbin_uN64__ortools_vendor__ubuntu_noble_amd64__binary/
THANKS @aosmw

Sorry for the hype. Some amd64 binaries cannot be compiled because compilation takes more than 120 minutes:
https://build.ros2.org/job/Jbin_uN64__ortools_vendor__ubuntu_noble_amd64__binary/
https://build.ros2.org/job/Hbin_uJ64__ortools_vendor__ubuntu_jammy_amd64__binary/

The universe is teasing. ;/
The Rolling jazzy build that succeeded took 1h52min.  NOTE the build is forced to be single threaded on the ros build farm. https://github.com/ros-infrastructure/bloom/pull/643
The Rolly jazzy build computer spec
12:37:45 # BEGIN SECTION: cpu info
12:37:45 + lscpu
12:37:45 Architecture:                       x86_64
12:37:45 CPU op-mode(s):                     32-bit, 64-bit
12:37:45 Byte Order:                         Little Endian
12:37:45 Address sizes:                      46 bits physical, 48 bits virtual
12:37:45 CPU(s):                             4
12:37:45 On-line CPU(s) list:                0-3
12:37:45 Thread(s) per core:                 2
12:37:45 Core(s) per socket:                 2
12:37:45 Socket(s):                          1
12:37:45 NUMA node(s):                       1
12:37:45 Vendor ID:                          GenuineIntel
12:37:45 CPU family:                         6
12:37:45 Model:                              85
12:37:45 Model name:                         Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz
12:37:45 Stepping:                           4
12:37:45 CPU MHz:                            2999.994
12:37:45 BogoMIPS:                           5999.98
12:37:45 Hypervisor vendor:                  KVM
12:37:45 Virtualization type:                full
12:37:45 L1d cache:                          64 KiB
12:37:45 L1i cache:                          64 KiB
12:37:45 L2 cache:                           2 MiB
12:37:45 L3 cache:                           24.8 MiB
12:37:45 NUMA node0 CPU(s):                  0-3

The humble build that was timed out after 2 hrs was the same spec.
00:07:48 # BEGIN SECTION: cpu info
00:07:48 + lscpu
00:07:48 Architecture:                       x86_64
00:07:48 CPU op-mode(s):                     32-bit, 64-bit
00:07:48 Byte Order:                         Little Endian
00:07:48 Address sizes:                      46 bits physical, 48 bits virtual
00:07:48 CPU(s):                             4
00:07:48 On-line CPU(s) list:                0-3
00:07:48 Thread(s) per core:                 2
00:07:48 Core(s) per socket:                 2
00:07:48 Socket(s):                          1
00:07:48 NUMA node(s):                       1
00:07:48 Vendor ID:                          GenuineIntel
00:07:48 CPU family:                         6
00:07:48 Model:                              85
00:07:48 Model name:                         Intel(R) Xeon(R) Platinum 8124M CPU @ 3.00GHz
00:07:48 Stepping:                           4
00:07:48 CPU MHz:                            2999.994
00:07:48 BogoMIPS:                           5999.98
00:07:48 Hypervisor vendor:                  KVM
00:07:48 Virtualization type:                full
00:07:48 L1d cache:                          64 KiB
00:07:48 L1i cache:                          64 KiB
00:07:48 L2 cache:                           2 MiB
00:07:48 L3 cache:                           24.8 MiB
00:07:48 NUMA node0 CPU(s):                  0-3

Gcc 13.2 got faster.

I wonder if these guys have mellowed since 2022 and its worth asking for 15 more minutes.
https://discourse.ros.org/t/how-to-handle-timed-out-build-jobs/28127/3

Fortunately, we got a slightly faster cpu on today's compilation and now ortools_vendor is compiled successfully by all ROS buildfarms. Thank you @aosmw


Fix widget sizing on current Gtk+ 3.22 branch

Gtk recently started emitting configure events when repositioning child
windows1. Events for the form's child windows bubble up the widget
hierarchy, get caught by our configure event handler, and treated as if
they were reporting the size of the form window. As a result, the shell
was sized using far too small dimensions2. This change will be part
of Gtk+ 3.22.2.
Solve this by checking whether the configure event we get is really for
the form widget.

As a result, the shell was sized using far too small dimensions2.

Thinking about the current implementation of our GtkForm, I wonder if that really happend to gvim with the said change in GdkWindow.  Could you tell us more about the bug itself?

This change will be part of Gtk+ 3.22.2.

Is that a final decision?

Thinking about the current implementation of our GtkForm, I wonder if that really happend to gvim with the said change in GdkWindow. Could you tell us more about the bug itself?

The symptom is a nearly empty window—most obviously, the main text widget is missing. While resizing the window, you could occasionally see it get drawn for a frame, but it immediately disappears again.
The initial reporter already determined the commit which was causing the problem. I poked around a bit and saw Gtk complaining about zero sizes being set. G_DEBUG=fatal-warnings pointed me to the configure-event handler, and eventually I added a printf there to print out the width and height.
I noticed that on each resize it fired multiple times, the first time having the correct size and the subsequent times being too small, from a slightly smaller size to much smaller sizes, most of them 1x1.
I suspected that the handler was seeing configure events for child widgets, and added the check to disregard them. That solved the issue. I also rechecked with Gtk 3.22.1 to verify it still works.

Is that a final decision?

Probably. I'm still waiting for a verdict on https://bugzilla.gnome.org/show_bug.cgi?id=773387 .
The change was made to fix https://bugzilla.gnome.org/show_bug.cgi?id=771320 and https://bugzilla.gnome.org/show_bug.cgi?id=767713 . From my limited understanding of GTK the it seems to be sound.

Seems this isn't a complete fix yet, as when using gnome-shell's tiling or maximizing the window, the widget isn't resized.

Entering visual mode even once seems to unbreak the resizing on maximize.

ftr

<ofourdan> note, I am not saying this is the right fix, but for now I don't know how to address the issue, in one case we want the configure events from gdk_window_move_resize_internal() because otherwise widgets such as GtkClutterEmbed which use a subsurface in Wayland do not /know/ of the new size/position, in the other case it seems gvim picks the wrong events as the gdkwindow comes after the size_allocate
<ofourdan> and still have the "old" size
<ofourdan> I would be willing to revert commit 12579fe but then I dunno how to fix the two issue this commit was to address...
<ofourdan> what happens is: configure_native_child() queue an event with the old size, gtkdrawingarea emits a configure event with the new size, then gtk dequeue the events and re-emit a configure with the old size
<ofourdan> which makes me think that the fix in gtk is broken and needs to be reverted
<ofourdan> yet I am still searching for another solution to the problems it was supposed to address

@heftig
Contrary to the impression I got from the words (of a gtk dev, I presume):

(...) I am not saying this is the right fix
(...) I would be willing to revert commit 12579fe
(...) which makes me think that the fix in gtk is broken and needs to be reverted yet I am still searching for another solution to the problems it was supposed to address,

the change in question has actually been included in 3.22.2.
I installed 3.22.2 last Sunday and confirmed that it broke gvim as you reported, and that your patch worked for me.
That said, I'm still not convinced whether or not the code newly added to around line 3102 of gui_gtk_x11.c is a right fix.  (Note that I leave this comment for record, not that I'm trying to ask you to address this issue right now.)
We could wait for him, ofourdan, coming up with the right solution; however, once the library is updated, it is hard for the users to make it revert safely.  Therefore, it would be better for us to do something about that if there would be something we could do rather than waiting for the right fix done in gtk.
Accordingly, I would think it's appropriate to merge your patch into the master if you could enclose the two blocks of the code with preprocessor directives like this:
#if GTK_CHECK_VERSION(3,22,2)
    <your new code>
#endif

Please note that, if, necessary, add the appropriate number of spaces between # and a directive to show the nest level.  By that guard, we wouldn't need to worry about any possible regression against the library older than 3.22.2.
Thank you for the report and the patch.
@brammool
After the version check directives are added by @heftig, please consider the inclusion of his patch.  I've been using a gvim applied with the patch since last Sunday and found no issue so far with it.  Actually, using that patched gvim, I prepared another patch to address other issues on 3.22.2.  I'll send you my patch after @heftig 's revised patch is included, then making my patch rebased on that.

I'm actually reasonably confident these changes won't break on older GTK3 versions.

In this particular case, simply adding four lines of code to the patch 100% guarantees no break, and by doing that, no break can be easily achieved and verified even by people who are not necessarily GTK experts, which is much more important to maintain the codebase after your patch might be included than accepting changes on the basis of someone's confidence which no one can verify.

Very well; I chose to go with a runtime check, though, since this isn't an ABI change.

The reason is not strong enough to justify introducing some overhead which is caused by the new runtime check to all the gvim linked against <= 3.22.1, which overhead is obviously unnecessary and avoidable.
Also , it looks strange and awkward that gtk_check_version(3,22,2) is enclosed by #if GTK_CHECK_VERSION(3,0,0) .. #endif.  That (with a wrong indentation) would confuse people when they visit the code for the purpose of maintenance or enhancement months or years later after a merge takes place.
Furthermore, I noticed that the patch didn't work for the case where one tries to do :vsplit in fullscreen with scrollbars enabled.

No, the split makes sense.
You can build gvim against GTK 2 but then can't run it against GTK 3.22.2, so the new code should not be present in this case.
You can build gvim against GTK 3.0.0 and then run it with GTK 3.22.2, so the new code should be present. But as you asked we should not risk altering the behavior of GTK < 3.22.2, so the runtime check is needed.
Anyway, this has been the extent of time and energy I'm willing to spend on this bug.

If you build gvim against GTK 3.0.0 you can run it with GTK 3.22.2, so the new code should be present. But as you asked we should not risk altering the behavior of GTK < 3.22.2, so the runtime check is needed.

That depends on the characteristics of the dynamic loader in use, and hence on the OS, whether or not a binary which is built like that works well with a version of the library higher than that against which it was linked at build time.  On some systems, the dynamic loader rejects linking and tells the user about version mismatch.
In addition, it is the fact, at least from my experience during the gtk3 gui development,  that, once a function is deprecated in gtk3, it is not maintained well and often stop working at runtime even if it was built without problem.  That's why the gtk3 code involves many of #if GTK_CHEK_VERSION().  Those are non-trivial efforts to make the gui work well for every still-used version of gtk3.   Don't break that.
Accordingly, it is strongly discouraged for people to run a binary built with an old gtk3 with a newer gtk3.  No one can guarantee it works.
Therefore, any runtime check doesn't make sense at all.  Gtk 3 is different from other ordinary library with this respect because of its drastic changes happening even between micro version number updates.

I applied the two patches on top of vim 8.0.45 (with gtk+ 3.22.2) and gvim window still does not render properly, getting the following warnings on console:
(gvim:26226): Gtk-CRITICAL **: gtk_widget_set_size_request: assertion 'width >= -1' failed
*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug

*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug

*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug

*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug

*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug

*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug

(gvim:26226): Gtk-CRITICAL **: gtk_widget_set_size_request: assertion 'width >= -1' failed
*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug

*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug

*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug

(gvim:26226): Gtk-CRITICAL **: gtk_widget_set_size_request: assertion 'width >= -1' failed
*** BUG ***
In pixman_region32_init_rect: Invalid rectangle passed
Set a breakpoint on '_pixman_log_error' to debug

(gvim:26226): Gtk-CRITICAL **: gtk_widget_set_size_request: assertion 'width >= -1' failed

Gtk 3.22.4 should have fixed this.


feat: add rootfs image scanning notifications

Issue #, if available:
Closes #357
Description of changes:
Amazon ECR offers Enhanced Image Scanning, which we have enabled for the rootfs image used for Finch on Windows. This change implements a stack to automatically notify Finch developers of scan results when the finding is HIGH or CRITICAL in severity (aka CVE score >= 7.0).
An SNS topic is created for the notification, and a Lambda function is wired to EventBridge to listen for events from AWS Inspector of those severities.
Testing done:
Manually deployment and verification of notification email. Emails received from AWS Notifications<EMAIL_ADDRESS>Example text below:
Rootfs Image Security Finding

    Severity: HIGH
    Type: PACKAGE_VULNERABILITY
    Description: Use After Free in GitHub repository vim/vim prior to 9.0.1858.
    Source URL: https://nvd.nist.gov/vuln/detail/CVE-2023-4752

    Status: ACTIVE
    Observed: Sep 7, 2023, 11:35:24 PM

    For more info, view the finding via ARN in the AWS Console: arn:aws:inspector2:us-west-2:<redacted>:finding/<redacted>

[x] I've reviewed the guidance in CONTRIBUTING.md

License Acceptance
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

It would be nice to have unit testing for the lambda function. Maybe we could look here for inspiration.

Thanks for the ref. For now I've opened #412 to track. Since this isn't critical infrastructure, failure in the lambda itself isn't going to be too painful. I'd argue it would be more valuable to ship this and get information on any vulnerabilities in the rootfs image first, and follow up w/ the test. Additionally... given the project is entirely typescript and this is the first introduction of python, would have to do some thinking on structure / potential reworking this to ts. WDYT? @austinvazquez

It would be nice to have unit testing for the lambda function. Maybe we could look here for inspiration.

Thanks for the ref. For now I've opened #412 to track. Since this isn't critical infrastructure, failure in the lambda itself isn't going to be too painful. I'd argue it would be more valuable to ship this and get information on any vulnerabilities in the rootfs image first, and follow up w/ the test. Additionally... given the project is entirely typescript and this is the first introduction of python, would have to do some thinking on structure / potential reworking this to ts. WDYT? @austinvazquez

Sounds good to me. Thanks for opening the issue for tracking.


New Backend system No custom query to the given id

Summary
can you please explain this annotations. do we need too add *) in end?
backstage.io/kubernetes-id: . *)
can you please update plugin install commands like that. It will little easy because of one command
yarn --cwd packages/app add @dynatrace/backstage-plugin-dql
yarn --cwd packages/app backend @dynatrace/backstage-plugin-dql-backend
yarn --cwd packages/app backend @dynatrace/backstage-plugin-dql-common
I have installed this new plugin and i am getting following error.
Error:
500: Error
No custom query to the given id "logs" found
Error: No custom query to the given id "logs" found
at QueryExecutor.executeCustomQuery
dql-backend/src/service/router.ts:64:40)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
{
"error": {
"name": "Error",
"message": "No custom query to the given id "logs" found",
"stack": "Error: No custom query to the given id "logs" found\n    at QueryExecutor.executeCustomQuery (*plugins/dql-backend/src/service/queryExecutor.ts:50:13)\n    at  (*plugins/dql-backend/src/service/router.ts:64:40)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)"
},
"request": {
"method": "GET",
"url": "/custom/logs?entityRef=component%3Adefault%2Farmada"
},
"response": {
"statusCode": 500
}
}

Hi, regarding

can you please explain this annotations. do we need too add ) in end?
No, this is just a reference to below
") While any value can be defined, it is recommended to set the backstage namespace followed by the component name."
The description to the annotations is also in the readme, so the annotation backstage.io/kubernetes-id: my-value will look for a kubernetes deployment with the label backstage.io/kubernetes-id: my-value

can you please update plugin install commands like that. It will little easy because of one command
Sure, we can do that.

I have installed this new plugin and i am getting following error.
Did you add a query with the id "logs" to your app-config.local.yaml


Allow deferred configuration of tasks.

Fixes issue #2. All the tasks now have properties that need to be initialised
before the tasks can be used. Instead of having the tasks pull the required
information from the GVM extension, the plugin class performs the binding
between the extension and task properties.
This means that users can define their own GVM task instances and they can
also configure the convention-based ones at any time before execution.

On the question of whether this changes behaviour for anyone already using the plugin, the answer is no. Users can still configure everything through the gvm DSL, it's just that they also have the option of configuring the tasks directly at any time before execution. That's largely what the plugin class now does: binds the extension's values to the relevant tasks.

An additional benefit of this approach is that users can define their own instances of the SDK.env tasks, with their own settings.


KAFKA-17515: Fix flaky RestoreIntegrationTest.shouldInvokeUserDefinedGlobalStateRestoreListener by increasing stream client start timeout

It's regarding KAFKA-17515 Fix flaky RestoreIntegrationTest.shouldInvokeUserDefinedGlobalStateRestoreListener.
Found one more issue in the flaky test after PR #17187

KafkaStream(ks-1) took more than 60 seconds to initialize  stream tasks after kafkaStreams.start(), (5 of 115 flaky run over past 5 days) (The flaky test was observed up to 70 secs to initialize KafkaStream)(Put the flaky link under Jira comments.)

To solve this issue, increase timeout from 60 sec to 180 sec.
Committer Checklist (excluded from commit message)

[ ] Verify design and implementation
[ ] Verify test coverage and CI build status
[ ] Verify documentation (including upgrade notes)

Close it sinece the Jenkins build has been disable.
We shouldn't see the unstable build again. Will keep monitoring this issue.


Admin's IP was banned

Content manager just send me this screenshot. It says that he's IP was blocked. But I don't see any bans in admin panel (screenshot).
Also I just noticed that if I change a language of a system on this path:
/dashboard/system/basics/multilingual
it doesn't change it even after re-log in. Something's not right here...

@Freakmeister
GitHub issues are not for technical support.

For technical support, please create a new discussion on the forum.
For specific questions, please use StackOverflow.


Fix memory leak by moving the "positionColorMask" declaration outside of function scope

Purpose
During a performance issues investigation in our app, which uses Inputmask heavily, we found out that an Inputmask instance was leaked, further leaking various objects referenced in that scope. This created a large memory leak after prolonged usage, as the app is a SPA, so the users rarely refresh the page and we have tens or hundreds of inputs with input masks on some pages.
Approach
The leaked scope was that of maskScope, which attaches the positionColorMask method on the Inputmask prototype. I'm not yet sure why the scope is leaked, since the positionColorMask function does not access any variable outside its own scope, but it definitely was leaked.
The maskScope function scope was retained on the prototype, which was retained in the global module registry (we use Babel and imports in our app), which is ultimately set on window, thus retaining the last maskScope through this chain.
I could not reproduce this outside our app in a JSFiddle, which is probably because we have the import usage and the module registry, which was not present in JSFiddle. However, with the fix in this PR we noticed a visible reduction in memory usage after instantiating / destroying multiple input masks.
Finally, even without a reproduction, it does not make sense for that method to be declared inside maskScope, especially because it does not use anything from the scope. It might have made sense when it was first implemented, but right now the prototype declaration is the right place for declaring this method.

@monovertex ,
Hmm, probably because in every maskscope positionColorMask is redefined and leaving the initial funtion in memory or so, ...
Thx for the info.


Unable to use bag file

Required Info

Camera Model
D455

Operating System & Version
MacOS 14.2.1

Platform
macbook pro m1

SDK Version
2.54.2

Language
python

Unable to use bag file
I'm encountering an issue when attempting to use a bag file for testing my script. Every time I run the script, I encounter the following error:
pipeline.start(config)
RuntimeError: Couldn't resolve requests

code example:
import pyrealsense2 as rs

...

pipeline = rs.pipeline()
config = rs.config()
rs.config.enable_device_from_file(config, args.input)
config.enable_stream(rs.stream.depth, 1280, 720, rs.format.z16, 6)
pipeline.start(config)

This is my first attempt to use pyrealsense2 on my MacBook Pro M1. Despite exploring multiple solutions available online, I have not been able to resolve the issue. Any form of assistance or guidance would be greatly appreciated.
To install the python lib i used pyrealsense2-macosx

Hi @Nikappa57  The FPS speed of '6' is not supported on the D455 camera model.  '5' should be used as the minimum FPS instead on D455.

Okay, thank you, I didn't know that. Anyway, I've already tried with different settings, both fps and resolution, and it doesn't change anything.  I tried setting it to 5 now, and it doesn't work.

The resolution and FPS in the script should also match the resolution and FPS of the depth stream that is recorded in the bag file.
If you do not know the bag file's depth stream resolution and FPS then you can find these settings by opening the RealSense Viewer tool and playing the bag file back in the Viewer by drag and dropping the file into the center panel of the Viewer to automatically initiate playback, then looking in the side-panel for the stream settings by expanding open the 'Stereo Module' category.

My settings are:
{
    "stream-depth-format": "Z16",
    "stream-fps": "30",
    "stream-height": "720",
     "stream-width": "1280"
}

I tried changing the resolution and fps because I found it as one of the possible solutions online, but I don't think that's the issue.
It's worth noting that on another Windows PC that we have always used, the code works.

Is there any difference on your Mac if you specify the bag file name instead of args.input?  The bag file should be placed in the same directory as the script file.
For example, if the bag file was called test.bag:
rs.config.enable_device_from_file(config, 'test.bag')

I made a mistake, the complete configuration file for the recording is
{
    "device": {
        "fw version": "<IP_ADDRESS>",
        "name": "Intel RealSense D455",
        "product line": "D400"
    },
    "parameters": {
        "aux-param-autoexposure-setpoint": "1000",
        "aux-param-colorcorrection1": "-0.493164",
        "aux-param-colorcorrection10": "-0.272461",
        "aux-param-colorcorrection11": "-0.272461",
        "aux-param-colorcorrection12": "-0.355469",
        "aux-param-colorcorrection2": "0.831055",
        "aux-param-colorcorrection3": "0.831055",
        "aux-param-colorcorrection4": "-0.368164",
        "aux-param-colorcorrection5": "-0.133789",
        "aux-param-colorcorrection6": "-0.323242",
        "aux-param-colorcorrection7": "-0.323242",
        "aux-param-colorcorrection8": "1.19141",
        "aux-param-colorcorrection9": "0.90918",
        "aux-param-depthclampmax": "65536",
        "aux-param-depthclampmin": "0",
        "aux-param-disparityshift": "0",
        "controls-autoexposure-auto": "True",
        "controls-autoexposure-manual": "33000",
        "controls-color-autoexposure-auto": "True",
        "controls-color-autoexposure-manual": "156",
        "controls-color-backlight-compensation": "0",
        "controls-color-brightness": "0",
        "controls-color-contrast": "50",
        "controls-color-gain": "64",
        "controls-color-gamma": "300",
        "controls-color-hue": "0",
        "controls-color-power-line-frequency": "3",
        "controls-color-saturation": "64",
        "controls-color-sharpness": "50",
        "controls-color-white-balance-auto": "True",
        "controls-color-white-balance-manual": "4600",
        "controls-depth-gain": "16",
        "controls-laserpower": "150",
        "controls-laserstate": "on",
        "ignoreSAD": "0",
        "param-amplitude-factor": "0.08",
        "param-autoexposure-setpoint": "1000",
        "param-censusenablereg-udiameter": "9",
        "param-censusenablereg-vdiameter": "9",
        "param-censususize": "9",
        "param-censusvsize": "9",
        "param-depthclampmax": "65536",
        "param-depthclampmin": "0",
        "param-depthunits": "1000",
        "param-disableraucolor": "0",
        "param-disablesadcolor": "0",
        "param-disablesadnormalize": "0",
        "param-disablesloleftcolor": "0",
        "param-disableslorightcolor": "0",
        "param-disparitymode": "0",
        "param-disparityshift": "0",
        "param-lambdaad": "800",
        "param-lambdacensus": "26",
        "param-leftrightthreshold": "24",
        "param-maxscorethreshb": "2047",
        "param-medianthreshold": "500",
        "param-minscorethresha": "1",
        "param-neighborthresh": "7",
        "param-raumine": "1",
        "param-rauminn": "1",
        "param-rauminnssum": "3",
        "param-raumins": "1",
        "param-rauminw": "1",
        "param-rauminwesum": "3",
        "param-regioncolorthresholdb": "0.0499022",
        "param-regioncolorthresholdg": "0.0499022",
        "param-regioncolorthresholdr": "0.0499022",
        "param-regionshrinku": "3",
        "param-regionshrinkv": "1",
        "param-robbinsmonrodecrement": "10",
        "param-robbinsmonroincrement": "10",
        "param-rsmdiffthreshold": "4",
        "param-rsmrauslodiffthreshold": "1",
        "param-rsmremovethreshold": "0.375",
        "param-scanlineedgetaub": "72",
        "param-scanlineedgetaug": "72",
        "param-scanlineedgetaur": "72",
        "param-scanlinep1": "60",
        "param-scanlinep1onediscon": "105",
        "param-scanlinep1twodiscon": "70",
        "param-scanlinep2": "342",
        "param-scanlinep2onediscon": "190",
        "param-scanlinep2twodiscon": "130",
        "param-secondpeakdelta": "325",
        "param-texturecountthresh": "0",
        "param-texturedifferencethresh": "0",
        "param-usersm": "1",
        "param-zunits": "1000"
    },
    "schema version": 1,
    "viewer": {
        "stream-depth-format": "Z16",
        "stream-fps": "15",
        "stream-height": "480",
        "stream-width": "640"
    }
}

And so, I updated the code
config.enable_stream(rs.stream.depth, 480, 640, rs.format.z16, 15)

But still, nothing.
I noticed that if I completely remove the line that sets the stream, the test code works.
#####################################################
##               Read bag from file                ##
#####################################################

# First import library
import pyrealsense2 as rs
# Import Numpy for easy array manipulation
import numpy as np
# Import OpenCV for easy image rendering
import cv2
# Import argparse for command-line options
import argparse
# Import os.path for file path manipulation
import os.path

# Create object for parsing command-line options
parser = argparse.ArgumentParser(description="Read recorded bag file and display depth stream in jet colormap.\
                                Remember to change the stream fps and format to match the recorded.")
# Add argument which takes path to a bag file as an input
parser.add_argument("-i", "--input", type=str, help="Path to the bag file")
# Parse the command line arguments to an object
args = parser.parse_args()
# Safety if no parameter have been given
if not args.input:
    print("No input paramater have been given.")
    print("For help type --help")
    exit()
# Check if the given file have bag extension
if os.path.splitext(args.input)[1] != ".bag":
    print("The given file is not of correct file format.")
    print("Only .bag files are accepted")
    exit()
try:
    # Create pipeline
    pipeline = rs.pipeline()

    # Create a config object
    config = rs.config()

    # Tell config that we will use a recorded device from file to be used by the pipeline through playback.
    rs.config.enable_device_from_file(config, 'video4Curva.bag')

    # Configure the pipeline to stream the depth stream
    # Change this parameters according to the recorded bag file resolution
    # config.enable_stream(rs.stream.depth, 480, 640, rs.format.z16, 15)

    # Start streaming from file
    pipeline.start(config)

    # Create opencv window to render image in
    cv2.namedWindow("Depth Stream", cv2.WINDOW_AUTOSIZE)

    # Create colorizer object
    colorizer = rs.colorizer()

    # Streaming loop
    while True:
        # Get frameset of depth
        frames = pipeline.wait_for_frames()

        # Get depth frame
        depth_frame = frames.get_depth_frame()

        # Colorize depth frame to jet colormap
        depth_color_frame = colorizer.colorize(depth_frame)

        # Convert depth_frame to numpy array to render image in opencv
        depth_color_image = np.asanyarray(depth_color_frame.get_data())

        # Render image in opencv window
        cv2.imshow("Depth Stream", depth_color_image)

        # Color frame
        color_frame = frames.get_color_frame()
        color_image = np.asanyarray(color_frame.get_data())
        cv2.imshow("Color Stream", color_image)

        key = cv2.waitKey(1)
        # if pressed escape exit program
        if key == 27:
            cv2.destroyAllWindows()
            break

finally:
    pass

Is this normal behavior?

If a config instruction to define the resolution, format and FPS is not specified then it is likely playing back every stream that is stored in the file simultaneously and using the resolution / FPS that the streams were recorded at.  This is similar to playback in the RealSense Viewer, where playback automatically displays all streams contained in the bag at the stored resolution / FPS without having to specify settings.
So whilst it is common to provide stream config instructions in a bag playback script, there is nothing wrong with your approach either.

Ok, all clear, thank you. However, is there any other way to resolve the earlier error? Otherwise, I'll proceed without configuring the stream.

There have been past cases where code that works fine on a windows / Linux PC has problems on a non-PC computer / computing board for reasons that are not clear.  I cannot see any obvious problems in your code that would cause the RuntimeError: Couldn't resolve requests error.
This error is usually caused because a stream configuration has been requested that the camera is unable to provide.  But you are retrieving the streams from a bag file, so a camera-related issue could be ruled out.  I note that the code works correctly on a Windows PC, which indicates that the code is okay and something else is causing the issue with the config instructions on your Mac.
I think that if the stream that is stored in the bag is recorded in the same resolution / FPS that you want to define in config instructions in your script, then you could proceed without configuring the streams.

Thank you very much for the quick and helpful assistance you provided. I'll continue on my way.


build: add metadata to pyproject.toml

Closes #5 .
Summary of Changes

Bump version number
Improve description
Add link to README
Add link to repo
Add link to docs
Add keywords

🦙 MegaLinter status: ✅ SUCCESS

Descriptor
Linter
Files
Fixed
Errors
Elapsed time

See detailed report in MegaLinter reports
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff
MegaLinter is graciously provided by


solo2-cli: init at 0.1.1

Motivation for this change
Support for the CLI for SoloKeys' new Solo2 key.
Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[x] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[x] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
22.05 Release Notes (or backporting 21.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 155172 run on x86_64-linux 1

1 package built:

solo2-cli

Anyone tried "solo2 update"?
It doesn't seem to do anything for me after "Tap button on key to confirm, or replug to abort..." and I hit the button and the light turns off.


Support bytes message key

Currently the message key is string. It would be good to make the key also be bytes backed. so people can configure a SerDe on the message key, which message router can use to compute which partitions a message should be routed to.
It should be considered together with schema registry.

/cc @mgodave @merlimat

based on the discussion before, we don't want to support bytes key. current string key is already enough to support bytes. so close it for now.

this is being implemented in #2612

This is done in #2612

This is done in #2612


MacOS UART break

See:
https://github.com/hathach/tinyusb/issues/2003
Looks like MacOS doesn't support CDC UART break. Ha will confirm next time the USB analyzer comes out.
We need an alternative out-of-band signal for Mac. Network engineers sometimes use a slow zero to reset cisco equipment. Terminal software like minicom or screen can't do that though. Guarded escape sequences like "+++" will not be allowed here. Need other ideas.
Recommended workaround: Linux in a VM.
Workaround for the obstinate: use an FTDI or SiLabs adapter on UTX and URX instead of the RP6502-VGA. These have proprietary MacOS drivers that support break.

https://github.com/picocomputer/rp6502/blob/21b45088631114887cb98d79252f88b3b80f2718/src/vga/usb/cdc.c#L28-L38


Update value.py

Added fingerprint of 2020 Subaru Levorg 2.0 VMG

Hi, please also send a route for verification

Here is a route for your reference:
https://connect.comma.ai/035220d29d178fad/1665703814130/1665709113161
Thanks!
martinl @.***> 於 2022年10月16日 週日 18:38 寫道：

Hi, please also send a route for verification
—
Reply to this email directly, view it on GitHub
https://github.com/martinl/openpilot/pull/84#issuecomment-1279942242,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A2SQAYRXQLRUZK3BJSHHUGDWDPLLNANCNFSM6AAAAAAQLHFN6E
.
You are receiving this because you authored the thread.Message ID:
@.***>

https://connect.comma.ai/035220d29d178fad/1665963099703/1665970032756
Another route for your reference
Chao-Chin (Kelvin) Chou @.***> 於 2022年10月16日 週日 19:01 寫道：

Here is a route for your reference:
https://connect.comma.ai/035220d29d178fad/1665703814130/1665709113161
Thanks!
martinl @.***> 於 2022年10月16日 週日 18:38 寫道：

Hi, please also send a route for verification
—
Reply to this email directly, view it on GitHub
https://github.com/martinl/openpilot/pull/84#issuecomment-1279942242,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A2SQAYRXQLRUZK3BJSHHUGDWDPLLNANCNFSM6AAAAAAQLHFN6E
.
You are receiving this because you authored the thread.Message ID:
@.***>

Please open the route in connect, then click More info and copy route name from first line in the menu
Also make sure you have uploaded all logs and Public access is enabled for the route

Route name: 035220d29d178fad|2022-10-17--07-31-39--0
Link: https://connect.comma.ai/035220d29d178fad/1665963099703/1665970032756
Route name: 035220d29d178fad|2022-10-14--07-30-14--0
Link: https://connect.comma.ai/035220d29d178fad/1665703814130/1665709113161
martinl @.***> 於 2022年10月17日 週一 21:43 寫道：

Please open the route in connect, then click More info and copy route name
from first line in the menu
Also make sure you have uploaded all logs and Public access is enabled for
the route
—
Reply to this email directly, view it on GitHub
https://github.com/martinl/openpilot/pull/84#issuecomment-1280883565,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A2SQAYTBPWNIXVWZCCKCCFTWDVJXZANCNFSM6AAAAAAQLHFN6E
.
You are receiving this because you authored the thread.Message ID:
@.***>

Route name: 035220d29d178fad|2022-10-17--19-15-03--13
Link: https://connect.comma.ai/035220d29d178fad/1666005303772/1666010308805
Chao-Chin (Kelvin) Chou @.***> 於 2022年10月17日 週一 22:49 寫道：

Route name: 035220d29d178fad|2022-10-17--07-31-39--0
Link:
https://connect.comma.ai/035220d29d178fad/1665963099703/1665970032756
Route name: 035220d29d178fad|2022-10-14--07-30-14--0
Link:
https://connect.comma.ai/035220d29d178fad/1665703814130/1665709113161
martinl @.***> 於 2022年10月17日 週一 21:43 寫道：

Please open the route in connect, then click More info and copy route
name from first line in the menu
Also make sure you have uploaded all logs and Public access is enabled
for the route
—
Reply to this email directly, view it on GitHub
https://github.com/martinl/openpilot/pull/84#issuecomment-1280883565,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A2SQAYTBPWNIXVWZCCKCCFTWDVJXZANCNFSM6AAAAAAQLHFN6E
.
You are receiving this because you authored the thread.Message ID:
@.***>

Thanks, I checked the route and added the fw values to subaru-community branch

Great, thanks!
martinl @.***> 於 2022年12月7日 週三 01:16 寫道：

Thanks, I checked the route and added the fw values to subaru-community
branch
—
Reply to this email directly, view it on GitHub
https://github.com/martinl/openpilot/pull/84#issuecomment-1339709906,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/A2SQAYSDB2W53QWR6X6Y7UTWL5YHPANCNFSM6AAAAAAQLHFN6E
.
You are receiving this because you authored the thread.Message ID:
@.***>


Change the about section to reflect current POR.

Link images and socials in the about section to the current POR

Can you assign it to me please i am new to open source and i am learning how to contribute

Hey Irfan,
Thanks for showing your interest in our project, we would've really loved to have your contributions, but for now this site will be maintained by the students of BITS Goa.
Nonetheless, we hope you find other interesting projects to contribute to!


KeyedContainerMeta no longer working

... because in
func allKeys<K>() where K: CodingKey

K is a "non-nominal" type and this makes the whole thing unimplementable, so forget about 2.0, delete it, fix this and the other things that came up, maybe split meta protocols into encoding and decoding ones and then create a new release 2.0

Fixed


router back not work when loading

Version
3.1.6
Reproduction link
https://github.com/snowtreetree/router-back
youtube video ,  I upload my video to youtube , you can watch it in 15 second.
Description
It's not js, just image
** in my  app, you can change network to slow3g，when browser top left conrner show loading,  click to button, the page show correctly,  then click browser back, the router params have changed, but the page show no change.**
Steps to reproduce

What is expected?
router back immediately.
What is actually happening?
when something is loading，i want to let router go back, but the page does not change immediately,  when browser loading end,  the page show correctly.

In my app , I need to do something in router change(log my page path, title), but when the internet speed is slow,  use the function of back or go(-1), I can not back 🤷♀。

The browser doesn't emit the popstate event until it's ready, meaning Vue Router cannot detect the navigation done by the back button. The event is emitted later on and that's when the router detects the navigation.


Fix a resource leak in MetricsSinksConfig

looks good to me. :+1:

@windie - one of the unit tests seems to have failed. Can you run the unit tests in your machine and see if everything passes? To run unit tests, do the following
bazel test --config=darwin heron/...

@kramasamy - Passed locally: Executed 114 out of 114 tests: 114 tests pass. Seems //heron/instance/tests/java:SpoutInstanceTest is flaky. Could you rerun the Travis CI test, please?

@windie - restarted. once it finishes successfully, we can merge it.


Change tooltip styles on map

After:

Now:

Change:

Width styles.
Image description styles.
Image styles (on handlebars also change, now is a background.)
Delete "Description" title.
Create new Handlebars Function to limit strings on the description content and include three dots at the end.


deletes unused server code; removes npm run server from package.json

Chatted with @ericpgreen2 and we began deleting unused code, a fun activity.
Who should review this?

fyi: npm run server is the entry point for the VScode debugger, and seems to work fine for that purpose (see the notion doc I sent around this morning). Can we make sure that an alternative run command works with the debugger before removing that one?

Merged. @bcolloran, with PR #194, there are two run commands available for client & server.


Multiple start and complete events are emitting

Hi Team,
I have integrated OpenLineage in databricks cluster with following configuration.
spark.openlineage.host XXX
spark.openlineage.namespace XXX
spark.openlineage.version XX.
by attaching the cluster to particular notebook and running that notebook lineage data is generating with start and complete event. But those events are generating multiple times for same job of notebook which kind of redundant and data is same both those events.
Do we have option to get only one start and complete event of one job running in notebook ?

Hi @MayurMundekar, could you please provide more details like the code snippet that generates multiple events on Databricks? Single Spark notebook can run several Spark actions or execute several SQLs and for each action/SQL being run .

sure @pawel-big-lebowski  I will share the snippet shortly.

Hi @pawel-big-lebowski , Please find the attachment of code snippet.
I have create sql file in notebook with two commands drop and create.
After running the notebook open lineage generate 2 files for START and 2 files for COMPLETE event for "databricks_shell.atomic_create_table_as_select" JOB.
Attachment:-
Test.zip
Other Information
I have created one api project which have endpoint like http://XXX.net/api/v1/lineage. and this URL i pointed as value of spark.openlineage.host in spark config. and using this endpoint i am collecting the lineage data and saving  in json format.
let me know if any other information is required.
Thanks
Mayur

@MayurMundekar - Just to be sure, your code snippet was just the following:
-- Databricks notebook source
drop table testtable;
Create table testtable select 'test' as name

OpenLineage emits once for every SQL ExecutionStart, Job Start, Job End, and SQL ExecutionEnd.

Hi @wjohnson , ok I get it . Now just wanted to be sure for the code snippet which I shared earlier for that the files which are generated I am sharing here can you please just check because the data for run-id is almost same 7611e8b6-c442-4aa2-b3b6-a40432b442ef. can you please take look at that. As I am not seeing much difference I think if take the file based on latest time for this run-id . I will get all data.
Attachment:
DataGeneratedByEvents.zip


issue #62 add repeat parsers

Codecov Report

Merging #63 (5534c3a) into main (47fbae7) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #63      +/-   ##
==========================================
+ Coverage   99.09%   99.10%   +0.01%
==========================================
  Files          16       16
  Lines        1209     1225      +16
==========================================
+ Hits         1198     1214      +16
  Misses         11       11

Flag
Coverage Δ

unittests
99.10% <100.00%> (+0.01%)
:arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

source/karasux/parser/composite.d
98.55% <100.00%> (+0.43%)
:arrow_up:

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 47fbae7...5534c3a. Read the comment docs.


Unexpected false Requeue in result.Min

Description
Observed Behavior:
If nodeclaim's initialized condition is false and registered condition is true, here all the items in results will have a zero RequeueAfter, and this function will throw a result with Requeue is false and RequeueAfter is zero.
https://github.com/kubernetes-sigs/karpenter/blob/79fe77292f7f08dce7a3469721049c8e728429ce/pkg/utils/result/result.go#L27-L40
Expected Behavior:
maybe we should set Requeue to true
Reproduction Steps (Please include YAML):
Versions:

Chart Version: 0.36.0
Kubernetes Version (kubectl version): 1.30.0

Sorry, I may have some misunderstandings here, the issue is closed now

Why should this change be made? If initialization is false, that means some condition on the Node has not yet been satisfied (e.g. missing resources, startup-taints present, etc). For those conditions to be satisfied, an update must be performed against the node (out-of-band of Karpenter) which will trigger the reconciler. Is there a case that this doesn't hold true for?

Is there a case that this doesn't hold true for?

Yes, in fact I'm using kwok as cloud provider to benchmark karpenter, when I'm trying to scale nodeclaims up to 2000 at one time this issue happened, it seems that controller missed node readiness event and the nodeclaim won't be reconciled again, so the nodeclaim will stay in not ready condition

Interesting, are you able to reproduce this consistently or was it a one off? I'm wondering if there's some other condition which caused the Node to not be considered initialized or if we really are missing the event. If we're missing the event, we should figure out if it's due to the predicates in the registration function, or an actual issue in controller-runtime / client-go (less likely). I don't think we want to jump ahead and just add a requeue though until we understand the root cause.

Interesting, are you able to reproduce this consistently or was it a one off?

It's reproducable, here is my reproduction process:

running karpenter(v0.36.0) with kwok provider
create a deploy with 0 replicas with large resource claim to ensure that for each node only one pod can be scheduled
scale up the deploy to over 2000 replicas in one time

then up to 2000 node will be created and in ready status as expected, but some nodeclaims will stay in not ready forever


Rename RAML file

Usually in all projects we are putting it raml/api.raml

Coverage remained the same at 29.043% when pulling 44c8ba72da96700f02bd5d6c065bf41b9e3d6068 on rename_raml into 96cdc7f761e2325272dc92e822afe03d6ed9e321 on master.


Renamed asset not showing as "Renamed" but as "Modified"

Directly after the "rename" operation, the editor shows an "Added" file, and "Submit to source control" window shows 2 "Added" files
Git status returns the following, showing the redirector and the renamed asset
git status --porcelain --ignored
M  Content/UE4GitPluginDev/Named.uasset
C  Content/UE4GitPluginDev/Named.uasset -> Content/UE4GitPluginDev/ReNamed.uasset
 M Plugins/UE4GitPlugin

At this stage, Copied status could be interpreted as renamed/moved or keep this explicit status.
After "Fix Up Redirectors in Folder" we obtain the following:
R  Content/UE4GitPluginDev/Named.uasset -> Content/UE4GitPluginDev/ReNamed.uasset

But still, the icons only show Added and Removed items

Fixed as of recent release v2.2


RFE: add a check to make sure actor can consume a message

This is related to https://github.com/oamg/leapp-repository/issues/334
In case there is an actor which consumes a message which will be created in the next phase, we should issue a warning / raise an exception.

https://github.com/oamg/leapp/pull/564 should handle the issue...

The #564 PR has been merged. Closing the issue.


Multiple validations

Ruby-like validates using current methods and options forwarding

Nice work.  Good call on aliasing those types.


Ability to change replica count on dashboard in Runtime

Overview
To test failover scenarios (for example in this case: https://github.com/dotnet/aspire/issues/4357) first-class support for changing replica count in dashboard would be very helpful
This feature can be implemented closely with https://github.com/dotnet/aspire/issues/295, because two scenarios are very similar (restart is basically scaling pods to 0 and than back to replica_count)
For example, we can start with ReplicaCount = 3 for service, but we can change it to "0" and "4", for example. This will insanely help with testing scenarios of failovers locally - test what happens if you just turn off the database, and than rescale it
This would like smth like this:

This will also resolve issue https://github.com/dotnet/aspire/issues/3095 - as one of the ways to perform "complete stop" of the service (or even restart, after some time, with specified replica count we want)
However, It seems easy to add this feature for .NET apps, but it's might be not so trivial for applications where nodes are required to be in state of consensus (any leader-election, multimaster or master-replica architecture) (for example Kafka or Postgres), because it might be required to add info to all brokers/servers about new added host.

Yes this is something we definitely want to do. Adding it to the backlog for now.

We should create a meta replica set issue, which should include this one.


DRAFT: Initial exploration for a helm build task

There are known limitations to this task, but I am just exploring the functionality.

/rebuild

/retest

/retest

/rebuild

/rerun

No need to keep this draft PR open. The history will remain even with it closed.


visual studio 2015 changed the format string for floats

Unit test failures

resource:basis/formatting/formatting-tests.factor
Details:
==== resource:basis/formatting/formatting-tests.factor

resource:basis/formatting/formatting-tests.factor: 31

Unit Test: { [ "1.234000e+008" ] [ 123400000 "%e" sprintf ] }

=== Expected:
"1.234000e+008"
=== Got:
"1.234000e+08"
[Traceback]

resource:basis/formatting/formatting-tests.factor: 32

Unit Test: { [ "-1.234000e+008" ] [ -123400000 "%e" sprintf ] }

=== Expected:
"-1.234000e+008"
=== Got:
"-1.234000e+08"
[Traceback]

resource:basis/formatting/formatting-tests.factor: 33

Unit Test: { [ "1.234567e+008" ] [ 123456700 "%e" sprintf ] }

=== Expected:
"1.234567e+008"
=== Got:
"1.234567e+08"
[Traceback]

resource:basis/formatting/formatting-tests.factor: 34

Unit Test: { [ "3.625e+008" ] [ 362525200 "%.3e" sprintf ] }

=== Expected:
"3.625e+008"
=== Got:
"3.625e+08"
[Traceback]

resource:basis/formatting/formatting-tests.factor: 35

Unit Test: { [ "2.500000e-003" ] [ 0.0025 "%e" sprintf ] }

=== Expected:
"2.500000e-003"
=== Got:
"2.500000e-03"
[Traceback]

resource:basis/formatting/formatting-tests.factor: 36

Unit Test: { [ "2.500000E-003" ] [ 0.0025 "%E" sprintf ] }

=== Expected:
"2.500000E-003"
=== Got:
"2.500000E-03"
[Traceback]

resource:basis/formatting/formatting-tests.factor: 37

Unit Test: { [ "   1.0E+001" ] [ 10 "%11.1E" sprintf ] }

=== Expected:
"   1.0E+001"
=== Got:
"    1.0E+01"
[Traceback]

resource:basis/formatting/formatting-tests.factor: 38

Unit Test: { [ "  -1.0E+001" ] [ -10 "%11.1E" sprintf ] }

=== Expected:
"  -1.0E+001"
=== Got:
"   -1.0E+01"
[Traceback]

resource:basis/formatting/formatting-tests.factor: 39

Unit Test: { [ "  -1.0E+001" ] [ -10 "%+11.1E" sprintf ] }

=== Expected:
"  -1.0E+001"
=== Got:
"   -1.0E+01"
[Traceback]

resource:basis/formatting/formatting-tests.factor: 40

Unit Test: { [ "  +1.0E+001" ] [ 10 "%+11.1E" sprintf ] }

=== Expected:
"  +1.0E+001"
=== Got:
"   +1.0E+01"
[Traceback]

resource:basis/formatting/formatting-tests.factor: 41

Unit Test: { [ "-001.0E+001" ] [ -10 "%+011.1E" sprintf ] }

=== Expected:
"-001.0E+001"
=== Got:
"-0001.0E+01"
[Traceback]

resource:basis/formatting/formatting-tests.factor: 42

Unit Test: { [ "+001.0E+001" ] [ 10 "%+011.1E" sprintf ] }

=== Expected:
"+001.0E+001"
=== Got:
"+0001.0E+01"
[Traceback]

Happens on win32 and win64 both.


Questions about a proposed refactoring of the clock module

The existing implementation of the clock module is not very configurable, at least not for the SAMD51 series. In the project I'm working on, I had to resort to setting up the clocks with C-style code. That works well enough for now, but I started trying to figure out how I would refactor the clock module to be more configurable.
I think I have a reasonable structure, but I ran into an issue that I think will cause some ergonomic headaches. I was wondering if someone else might have some insight.
First, I should probably give a brief overview of the GCLK peripheral, in case people aren't familiar. The GCLK peripheral has 12 clock generators. Each clock generator takes a source clock, optionally divides it, and then distributes it to any of 48 different peripheral channels. Each clock generator can be driven by one of 8 different internal clock sources or by an external clock supplied on one of 2-3 different IO pins. Each of the 48 peripheral channels can be configured to accept a clock from any of the 12 different generators.
It seems I ought to parameterize the module in terms of the three different pieces: clock sources, clock generators, and peripheral channels. One of my goals for the module is to make it impossible for users to accidentally change a clock that is being used by some generator or peripheral. I thought this would be possible using the Rust ownership system, but it's not as ergonomic as I would like.
Each clock source has some associated resource that controls or supplies the clock. For external clocks, the resource is the gpio::Pin. For internal clocks, this could either be a HAL struct, if it exists, or a PAC Reg or RegisterBlock. When creating a clock::Source struct, I want it to take ownership of the associated resource, so that the resource cannot be modified or dropped while the clock source is in use. That is simple enough.
A similar situation exists between clock sources and clock generators. I don't want to allow users to free a clock::Source while a clock::Generator is still using it. If the clock source is external, then the clock source can only be used for a single clock generator. In that case, the clock::Generator could own the clock::Source, which would be simple. However, the situation is different for internal clock sources. In that case, any number of generators could use the same clock::Source. My first instinct was to use &Source, or more accurately PhantomData<&'a Source>, to keep it zero-sized. But that creates a problem. Once you create the clock::Source and supply a reference to the clock::Generator, you can never move the clock::Source. To me, this is very constraining. For instance, if you were using RTIC and you set up the clock::Source in init, you would probably want to move it into Resources for use by some other task(s). But once the clock::Generator has been created, you can no longer move the clock::Source.
I think my problem boils down to the difference between zero-sized types and normal types. If the clock::Source had a size greater than zero, this problem would be unavoidable. You would have to store the clock::Source somewhere off the stack before referencing it. But in this case, each clock::Source is guaranteed to be zero-sized. As a result, there is no memory to point to, so there is no reason you couldn't move the clock::Source after referencing it. Really, I'm trying to use the reference as a way to guarantee the clock::Source outlives the clock::Generator, but nothing more. Can anyone think of a way to implement that?
I tried using a technique described in the zero-sized references article. The approach there is to use a static mut allocation within the impl of a zero-sized type to store the resource in question. But that doesn't work for me, because I need the allocation to be generic. Here's an outline of what I was trying to do, but it won't compile on the Playground.
use std::marker::PhantomData;
use std::mem::MaybeUninit;

pub struct Register;

pub trait SourceType: Sized {
    type Resource;
    fn new<'a>(resource: Self::Resource) -> Source<'a, Self>
    where
        Self::Resource: 'a,
    {
        Source::new(resource)
    }
}

pub struct SourceTypeA;

impl SourceType for SourceTypeA {
    type Resource = Register;
}

// The resource is stored in the static,
// so it will never move and invalidate this reference,
// unless the user tries to free the Source
#[derive(Copy, Clone)]
pub struct Source<'a, S>
where
    S: SourceType,
{
    marker: PhantomData<&'a S::Resource>,
}

impl<'a, S> Source<'a, S>
where
    S: SourceType,
{
    fn new(resource: S::Resource) -> Source<'a, S> {
        let s = Self { marker: PhantomData };
        *s.storage() = resource;
        s
    }
    // Note: I haven't thought through all of the issues with unsafe here.
    // This was just a quick test.
    fn storage(&self) -> *mut S::Resource {
        static mut STORAGE: MaybeUninit<S::Resource> = MaybeUninit::uninit();
        unsafe { STORAGE.as_mut_ptr() }
    }
    // This is not correct as written, because each Source copy could call free.
    // I haven't thought through how to solve that problem,
    // because I didn't get past the `static` problem.
    pub fn free(self) -> S::Resource {
        *self.storage()
    }
}

This example gives me error[E0401]: can't use generic parameters from outer function. I tried promoting the static allocation to the impl level, but you can't have static items in an impl. The same restriction applies to traits as well.
I suppose I could manually allocate all of the necessary statics at the module level and point to the correct static in each SourceType implementation, but that feels really hacky. Is there a better way?

One option might be to create a separate struct (or a separate typestate) representing a configured, "frozen" clock that can be used by a peripheral. For clock sources that can be shared, the frozen clock handle would implement Clone (or an analogous operation), and peripherals could take ownership of the clones,, with all clones implicitly sharing ownership of the clock source (without actually holding a reference to it). The tricky part would be taking ownership of the clock back so it could be unfrozen. You could implement that a couple of ways:

Store a reference count in a static core::sync::atomic::AtomicU8. Increment it every time you create a frozen handle, and decrement it with Drop. Have the frozen handle implement TryInto<UnfrozenClockSource>, where TryInto only succeeds if the reference count is one.
This requires taking up some memory at runtime, but not a lot.

Store a reference count as a type parameter, i.e. by using the typenum crate. "Cloning" a handle consumes it and produces two new handles with a higher reference count. Handles with reference counts greater than one can be "merged", reducing the count again. Handles with a reference count of one can be unfrozen.
I'd have to think through the full implications of this strategy, since the reference count wouldn't be global. This strategy would also make it harder to reclaim ownership in cases where the structure of the code doesn't let the compiler "prove" that everything will be reclaimed.

Actually, that latter idea probably won't work as-is, at least not without some annoying restrictions. Something like this rough sketch might work, though. AddOne, SubtractOne, and Zero don't actually exist as-is, but I'm too lazy to read the typenum docs right now to figure out what they would actually be.
struct Source {}

impl Source {
    pub fn freeze() -> Frozen;
}

struct Frozen<RefCount> {}

impl<RefCount> Frozen<RefCount> {
    pub fn borrow(self) -> (Self<AddOne<RefCount>>, Handle>);
    pub fn return(self, handle: Handle) -> Self<SubtractOne<RefCount>>, Handle>;
}

impl Into<Source> for Frozen<Zero> {
    // ...
}

A downside of this approach is that you can't just rely on Drop; any dropped handle is lost forever, so you can never use that clock source again.

Hmm. Good idea. I was thinking that I wanted an Rc, but I didn't want to pay the runtime cost for an Rc. So create a type-level Rc! Here's something that compiles on the Playground.
use std::marker::PhantomData;
use std::ops::{Add, Sub};
use typenum::{Unsigned, NonZero, Add1, Sub1, B1, U0}; // 1.12.0

struct TypeRc<N: Unsigned> {
    n: PhantomData<N>,
}

impl<N> TypeRc<N>
where
    N: Unsigned + Add<B1>,
    Add1<N>: Unsigned,
{
    pub fn borrow(self) -> TypeRc<Add1<N>> {
        TypeRc { n: PhantomData }
    }
}

impl<N> TypeRc<N>
where
    N: Unsigned + NonZero + Sub<B1>,
    Sub1<N>: Unsigned,
{
    pub fn replace(self) -> TypeRc<Sub1<N>> {
        TypeRc { n: PhantomData }
    }
}

impl TypeRc<U0> {
    pub fn free(self) {}
}

Actually, I guess your first version of that idea was close to an Rc, but like you said, it's a bit awkward, if it would even work. I think the latter approach is better. It's reference counting, but it's not an Rc.

I'm pretty much done with my refactor of the clock module. I don't have time to write it up tonight, but I will try to soon.
I implemented compile-time reference counting, as discussed above. However, the current implementation doesn't use any abstraction or encapsulation. It directly implements the code above, which is not the prettiest. Separately from the clock module, I've been trying to find some way to encapsulate compile-time reference counting, but I have struggled to find an implementation that significantly reduces the number of trait bounds needed in user code. I kept hitting road block after road block. Tonight, I finally came up with a clean solution. I thought I would leave it here. I'll probably update my clock code to use this encapsulation.
Here's the library code.
use std::marker::PhantomData;
use std::ops::{Add, Sub};

use typenum::{Unsigned, Bit, Add1, Sub1, UInt, B1, U1, U0};

struct RefCountType<N: Unsigned> {
    n: PhantomData<N>,
}

pub trait UNonZero: Unsigned {}

impl<U: Unsigned, B: Bit> UNonZero for UInt<U, B> {}

pub trait RefCount {}

impl<N: Unsigned> RefCount for RefCountType<N> {}

pub trait RefCountOps {
    type Add: RefCount;
    type Sub: RefCount;
    fn add(self) -> Self::Add;
    fn sub(self) -> Self::Sub;
}

impl<N> RefCountOps for RefCountType<N>
where
    N: UNonZero + Add<B1> + Sub<B1>,
    Add1<N>: UNonZero,
    Sub1<N>: Unsigned,
{
    type Add = RefCountType<Add1<N>>;
    type Sub = RefCountType<Sub1<N>>;
    fn add(self) -> Self::Add {
        RefCountType { n: PhantomData }
    }
    fn sub(self) -> Self::Sub {
        RefCountType { n: PhantomData }
    }
}

impl RefCountOps for RefCountType<U0> {
    type Add = RefCountType<U1>;
    type Sub = RefCountType<U0>;
    fn add(self) -> Self::Add {
        RefCountType { n: PhantomData }
    }
    fn sub(self) -> Self::Sub {
        RefCountType { n: PhantomData }
    }
}

pub trait RefCountZero: RefCount {}

impl RefCountZero for RefCountType<U0> {}

And here is user code.
pub struct Test<T>
where
    T: RefCount,
{
    t: T,
}

impl<T> Test<T>
where
    T: RefCount + RefCountOps,
{
    pub fn borrow(self) -> Test<T::Add>
    {
        Test { t: self.t.add() }
    }
    pub fn unborrow(self) -> Test<T::Sub>
    {
        Test { t: self.t.sub() }
    }
}

impl<T: RefCountZero> Test<T> {
    pub fn free() {}
}

I really like how it turned out. The user code is much cleaner, and users don't need to import or understand anything about typenum.

Hmm. I ran into another hang-up with the clock module. Maybe you can help @blm768.
I liked the idea of storing some object that controls the clock within each clock::Source struct. I think that makes a lot of sense for external clocks, because you can store and release the gpio::Pin. However, I just realized that structure doesn't work well for most, if not all, of the other clock sources.
At first, I wanted to store one of the PAC control registers within the clock::Source, but then I realized that wouldn't work. For instance, the Peripherals.OSCCTRL struct is zero-sized and can be moved out of Peripherals, but that struct controls multiple clocks. To get finer grained control, I thought about using individual registers, like Peripherals.OSCCTRL.dfllctrla for the DFLL source. But then I realized that the register itself is sized and exists behind OSCCTRL which implements Deref to point to the correct location in memory. You can't move dfllctrla out of OSCCTRL, and it wouldn't even make sense if you could, because dfllctrla is a VolatileCell underneath.
Furthermore, clock generators 2 - 11 can use generator 1 as a clock source. I wouldn't want to store generator 1 inside a clock::Source, because it can still be used for other purposes.
Ideally, I would like to prevent accidental changes to the clock sources at compile-time. But I'm not sure how to do that with my current architecture.
Instead, maybe I could create singleton tokens that represent each clock source. Then, when you go to configure each clock source elsewhere in the HAL, you would need to provide that token, indicating that the clock is not in use.
I think that might actually work well, but it requires HAL interfaces for each clock source to make it safe. I'm probably not willing to implement interfaces for every clock source type myself, since I would like to focus on the SPI and UART modules. But maybe others are interested and can implement them instead.
Thoughts?

This sounds a lot like what I've been playing with in terms of splitting SERCOMs. Basically, the PAC-level object is moved into a container type (in this case, Sercom, which can then be split into multiple parts  either by calling an appropriate method or moving out of public struct fields. The PAC object is dropped at that point, but the individual split objects can use unsafe code to access the underlying registers (with the understanding that no two split objects will access the registers in a way that might step on another object's toes).

A lot of the ideas in this thread overlap with #429 and are included in #450. I'm going to close this, finally.


Porting libnetwork fixes to 1.12.x

Brings to 1.12.x the fixes for the following issues:
#28112, #28465, #28606, #28630, #25184, #28697, #28845, #27188, #28055, #26251, docker/for-mac#849, docker/for-mac/issues/888, docker/libnetwork/issues/1474,

@aboch looks like issues

Not sure about vendor failure:
00:33:28 hack/dind: line 29: /go/src/github.com/docker/docker/hack/validate/vendor: No such file or directory
00:33:29 Build step 'Execute shell' marked build as failure

It looks like it is looking for the validate directory that was added for the new vendoring, which is not present in 1.12.x branch.

experimental is failing because in 1.12, plugins are still in experimental.
The media type for plugins was changed in 1.13 to application/vnd.docker.plugin.v1+json https://github.com/docker/distribution/blob/4ad885a6725bfca9ea00bd87341e367c0f919560/manifest/schema2/manifest.go#L21. As a result, the sample plugin we use in integration tests tiborvass/no-remove was re-pushed to Hub using this new mediatype.
That's why the tests are failing. We have 2 options:

Backport the plugin mediatype changes to 1.12.x
Repush a 1.12 version of tiborvass/no-remove that has the old mediatype and update the tests to use it.

I prefer (1)

For the plugin mediatype changes, we need https://github.com/docker/docker/commit/970b23db2e97e1671c6bf4b57bfe5d1a30e98819

An easier option is to simply add the new media type here https://github.com/aboch/docker/blob/76d2f1f29bbc11c92ab20489fc5eee2593b6d879/plugin/distribution/types.go#L16. Then use both the new and the old type for checking in https://github.com/aboch/docker/blob/76d2f1f29bbc11c92ab20489fc5eee2593b6d879/plugin/distribution/pull.go#L146

@johnstep can you please try this one, since there is no CI for 1.12.x on Windows

LGTM on Windows. It built successfully on Windows (for Windows) and all unit tests passed. I rebuilt and tested again with the resulting binaries, and that succeeded.

All experimental tests are failing due to the known plugin mediatype issue. It can be fixed by updating the code to accommodate to the expected media type of the sample plugin. Or the sample plugin can be re-pushed by @tiborvass
In either case, this PR can be merged, since the failing tests are unrelated to the PR.

LGTM ping @LK4D4 @tonistiigi

@anusha-ragunathan Thanks for your help in trying to solve the experimental failure on 1.12.x.
Given it is currently broken, I feel it would be more efficient if you guys address the plugin failure on experimental ci issue via a separate PR. Will also give you more control over what to change. After that is merged we can rebase our vendoring (libnetwork/swarmkit) PRs .
I went ahead and removed the uncomplete media type changes commit from this PR.

@aboch : Yessir! https://github.com/docker/docker/pull/29089

@tonistiigi windows is expected to fail

#29089 handles the experimental failures.
LGTM


fix demo mode by adding missing argument

@bmagyar proposed long ago to remove the argument consistently in #1 .
I fully agree with him.
The alternative, fully backwards-compatible fix is to simply add the argument. I propose this here.
Please merge one of these to fix the demo mode.

We'll accept this one.
There's a synchronization pending from our internal repositories to these github repositories that may change this, so I'd like to keep changes to a minimum for now.

Thanks! :)


Add logs directory to template .gitignore

The default configuration of :duct.module/logging writes to "logs/dev.log" when :duct.core/environment is :development.

Thanks! Can you change the description of the commit to:
Add logs directory to template .gitignore

Logging module writes logs to logs/dev.log in development environment.

It's a little easier to read without losing any information.

No problem, done! Happy to help polish any rough edges. 😄 Just worked through "Advancing Duct," really appreciate your organization. Looking forward trying Duct out with a board game.

Thanks! Glad you're finding Duct interesting enough to try!