Guild uses sys.executable for Python exe when running Python ops

In the context of an activated virtual env, this behavior is surprising, if not outright wrong.
Running Python based ops through guild.op_main with sys.executable means that user operations will use whatever Python runtime is used to run the guild command. This is reasonable outside a virtual environment, but it unreasonable in an activated env where Guild isn't installed.
The expected behavior IMO is that Guild use the Python runtime associated with the activated environment.
I think in order of precedence, where the target exists:

$CONDA_PYTHON_EXE
$VIRTUAL_ENV/bin/python
which python
sys.executable

This is fixed in 0.7.
Guild now uses the following logic for deciding whcih Python exe to use for operations:

GUILD_PYTHON_EXE if defined in the environment
CONDA_PYTHON_EXE if defined in the environment
$VIRTUAL_ENV/bin/python if exists
which python (emulates /usr/bin/env python)
sys.executable


Nick: Watch swlearner.com

Nick requests the watch of the watch_keyword swlearner\.com. See the MS search here and the Stack Exchange search in text, in URLs, and in code.

swlearner\.com has been seen in 3 true positives, 0 false positives, and 0 NAAs.

Approved by Jeff Schaller in Charcoal HQ


Cannot instantiate TorrentManager outside of the library

I get error when I try to do this:
TorrentManager manager = new TorrentManager(engine, torrent, this.fileService.GetContent(), new TorrentSettings());
Because the TorrentManager has only private and internal constructors

Why do you want to manually create a new TorrentManager? As far as I can see it's useless without a client. You're supposed to first create ClientEngine and then use AddAsync on it to create a new instance of TorrentManager.

Yup, exactly!
If you create a ClientEngine and call  "ClientEngine.AddAsync" you should be good to go!
In much much older versions of the library you were supposed to create this manually, but the new approach allows for a nice simplification for things like fetching metadata from other peers, and automatically saving/restoring it later.


localFile.url is not local for svg and gif files

Hello,
It seems gifs and svgs are not being downloaded, even though shouldDownloadImage: () => true in gatsby-config.js
This is part of my query
items {
  image {
    alt
    localFile {
      url
      childImageSharp {
        fluid(maxWidth: 550) {
          ...GatsbyImageSharpFluid
        }
      }
    }
  }
}

For any file that is not a gif or svg the files are loaded with childImageSharp and url points to /static/... but for gifs and svgs the image source points to https://images.prismic.io/...
The query above can be seen with one gif and one png file here: https://staging--quizrr-site.netlify.app/non-local-gifs/
Is this intended behaviour?

Hi @samirfors, sorry for the delayed response.
gatsby-transformer-sharp and gatsby-plugin-sharp do not support GIFs and SVGs as inputs. Using localFile.childImageSharp is powered by those two plugins.
See this issue: https://github.com/gatsbyjs/gatsby/issues/7317
If you need to have fluid GIFs and SVGs, I would recommend using fluid using the Imgix URLs instead. Prismic provides this functionality by default.
See this part of the docs: https://github.com/angeloashmore/gatsby-source-prismic#using-imgix-transformed-images

Closing this for now as it is intended behavior, but please post here if you're running into issues. Thanks!

Thank you for your response @angeloashmore.
Sorry, I was being a bit unclear. I'm actually more interested in the localFile.url-part. I understand that childImageSharp isn't populated here, but I thought localFile.url would point to a downloaded version of the gif/svg when shouldDownloadImage is set to true?
In the below example, both image.url and image.localFile.url point to the remote image on Prismic.
image {
  url
  localFile {
    url
  }
}

@samirfors I see, sorry for misunderstanding.
The following URL fields are sometimes available on File nodes, depending on the setup:

localFile.url: points to the source image URL, which in this case is the Imgix/Prismic URL.
localFile.publicURL: points to the local URL that can be used in your site. This does not work for plugins using gatsby-source-filesystem programmatically, like this one.

If you use gatsby-source-filesystem by itself, for example to load a folder of assets, then it will add the extra publicURL field to File. If gatsby-source-filesystem is not in your gatsby-config.js, however, then publicURL is never added.
Solutions - Either of the following should work

Setup gatsby-source-filesystem and point it to any file, such as gatsby-config.js:
{
  resolve: 'gatsby-source-filesystem',
  options: {
    path: `${__dirname}/gatsby-config.js`,
  },
}

publicURL should now be available on all localFile fields.

Install gatsby-transformer-remote-filesystem (community plugin)
localURL should now be available on all localFile fields.

These issues detail why and how this happens:
https://github.com/gatsbyjs/gatsby/issues/18001
https://github.com/gatsbyjs/gatsby/issues/19935

@angeloashmore Great answer, thank you for clarifying!
Adding gatsby-source-filesystem to gatsby-config.js did the trick indeed.


Make a Relationship Required

Closes: #873
What's Changed
So far, this code will check if a relationship on an object is required and raise a forms.ValidationError if the required side hasn't provided the relationship data. It also adds the same functionality to the create and update methods in nautobot.extras.api.relationships.RelationshipModelSerializerMixin.
It will prevent an object creation or edit if there is a required relationship defined for the object to a model which doesn't have any existing objects:

In the case of the UI, this presents as form validation errors.
In the case of the API, it will add serializers.ValidationErrors with messages detailing which endpoints to post required objects to.

TODO

[x] Modify existing UI tests (currently in PR #2371) to work with this refactor
[ ] UI bulk edit
[ ] UI bulk edit tests
[ ] API bulk edit
[ ] API bulk edit tests
[ ] API bulk create
[ ] API bulk create tests
[x] The following additional tests:

object is created without the relationship, then the relationship is marked as required, object is updated without the relationship (fails)
object is created without the relationship, then the relationship is marked as required, object is updated to include the relationship (succeeds)
object is created with the required relationship, object is updated without specifying any relationship data (succeeds, relationship remains in place)
object is created with the required relationship, object is updated to remove the relationship data (fails)

[ ] Docs

Let's focus on the documentation and any remaining test for the non-bulk use case. Opening issue to address bulk enforcement.


Used Module inspection does not propose the correct fix

As of beta 29, the installation of modules is not possible via the Used Module inspection.

Thankfully this actually turns out to be a false positive!


Support pack of global tools (PackAsTool)

require .net sdk >= 2.1.300
using PackAsTool with Pack target, allow to create tools (for .net core are FDD)
this PR:

remove the deps from generated nuspec
set the deps assemblies so are added to nupkg

if is just a console app (no p2p).
dotnet new console -lang f#
dotnet pack /p:PackAsTool=true

if you want, just put the nupkg in a reachable feed (local is ok), and do dotnet tool install mytool -g (global) or dotnet tool install mytool --tool-path "%CD%\dir_with_tools" (to put tools in dir_with_tools, so dir_with_tools\mytool will work)
if is a console app with p2p, put the PackAsTool property inside the fsproj, otherwise the p2p deps are not added in the nupkg.
NOTE if we modify the condition to check the type (lib vs exe), will be possibile to allow also /p:PackAsTool=true with p2p, but i dont care atm
dotnet new console -lang f#
# put the PackAsTool property in fsproj
dotnet pack

Tests are disabled atm (but works), i'll upgrade everything to 2.1.300-rc1 with #3183 so can be run

@forki @matthid ready to review!


Scp 4447 chainseek tx submission

Adds a proxy API for node Tx submission to chainseekd. Something we might want to think about is how we want to handle node connections going forward. As it stands, chainseekd is becoming the node proxy for Marlowe Runtime. Is this what we want? Its name is a bit misleading if that is the case.

This looks correct, but I didn't try executing it.

Bit difficult to test until the other components are ready... I suppose we will test it eventually when we integration test the whole stack!


OCSP: Fix unitialized variable error.

I am unable to compile master due to this issue.

[approve ci autest]


[Snyk] Security upgrade ubuntu from 22.04 to 22.10

This PR was automatically created by Snyk using the credentials of a real user.Keeping your Docker base image up-to-date means you’ll benefit from security fixes in the latest version of your chosen image.
Changes included in this PR

website/Dockerfile

We recommend upgrading to ubuntu:22.10, as this image has only 7 known vulnerabilities. To do this, merge this pull request, then verify your application still works as expected.
Some of the most important vulnerabilities in your base image include:

Severity
Issue
Exploit Maturity

Information Exposure SNYK-UBUNTU2204-GNUTLS28-3319581
No Known Exploit

Integer Overflow or Wraparound SNYK-UBUNTU2204-KRB5-3126899
No Known Exploit

Integer Overflow or Wraparound SNYK-UBUNTU2204-KRB5-3126899
No Known Exploit

Access of Resource Using Incompatible Type ('Type Confusion') SNYK-UBUNTU2204-OPENSSL-3314792
No Known Exploit

Out-of-bounds Read SNYK-UBUNTU2204-TAR-3261138
No Known Exploit

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.
For more information:
🧐 View latest project report
🛠 Adjust project settings

Learn how to fix vulnerabilities with free interactive lessons:
🦉 Learn about vulnerability in an interactive lesson of Snyk Learn.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


:globe_with_meridians: :bento: add link to Okuna roadmap in useful links

Following the discussion on Slack from November 25th, I added a new link in the Useful links section of the app. The link is https://okuna.io/roadmap as suggested by @duichwer - so before merging this, a redirect has to be added to the webserver configuration. Also, I have not generated the changes to the i18n files as I do not have sufficient rights to upload something to Crowdin

@lifenautjoe This reminds me of something I thought of a while ago. Since we've had the Slack invite link in Useful Links fail at least once (maybe twice?), how about making also that into an okuna.io redirect (okuna.io/slack)? That would make it a lot easier to fix a broken link since it wouldn't require a new app version.
(Sorry @stranljip for hijacking your PR a bit here. :wink:)

Hi @Komposten - I hope I did everything right - I changed the target branch to develop and added the generated i18n files. Next time I will create the PR from the development branch in my fork, promised :-)


Support for moment-hijri

Is there a plan to support hijri dates?
if not, could you please guide me through making one on my own?

https://github.com/alitaheri/material-ui-pickers-jalali-utils
Here is a nice example. You can publish your own utils and create PR on usage of your utils to the our docs.


[8.2.x] ISPN-6771 HotRod Client - TcpTransportFactory - update topology issue with multiple caches

https://issues.jboss.org/browse/ISPN-6771

Integrated thanks!


Thread mapping per scene stopped working

Describe the bug
After recent update i am now getting an error to scene thread mapping.

Hmm... It's still working when I test it, and there have been no changes to it since it's been implemented. Is this issue only present on the latest version? It might be something else causing it.

Investigating in the meantime.

I wonder if I uninstall and reinstall?
On Mon, Apr 29, 2024 at 9:30 PM Loki123 @.***> wrote:

Investigating in the meantime.
—
Reply to this email directly, view it on GitHub
https://github.com/therealguy90/foundrytodiscord/issues/39#issuecomment-2084087816,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/BB2I5KIMXW4N272DGJ3OHUDY73X37AVCNFSM6AAAAABG6Y3H62VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBUGA4DOOBRGY
.
You are receiving this because you authored the thread.Message ID:
@.***>

After I uninstalled and reinstalled it works. Something on my end must of
got mapped wrong. :) Sorry to bother you.
On Mon, Apr 29, 2024 at 9:50 PM Jacob Seward @.***> wrote:

I wonder if I uninstall and reinstall?
On Mon, Apr 29, 2024 at 9:30 PM Loki123 @.***> wrote:

Investigating in the meantime.
—
Reply to this email directly, view it on GitHub
https://github.com/therealguy90/foundrytodiscord/issues/39#issuecomment-2084087816,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/BB2I5KIMXW4N272DGJ3OHUDY73X37AVCNFSM6AAAAABG6Y3H62VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBUGA4DOOBRGY
.
You are receiving this because you authored the thread.Message ID:
@.***>


How to address a tagged CBOR number value not being deserialized as base time in SenMLRecord?

Question
Hi,
I have a meter that sends data encoded in SenML/CBOR. The first entry in an array of SenML records has a base time value, but it's tagged with tag 1 (i.e. for "Epoch-based date/time"). A minimal example of such a value:
[{-3: 1(1720696276)}]

The CBOR library Leshan uses doesn't recognize it as a number – because of that tag – thus making the BigDecimal-type base time value in the resulting deserialized SenMLRecord null.
This happens because the bt value of the CBORObject isn't considered a number, and it's expected to be one here:
https://github.com/eclipse-leshan/leshan/blob/e673ac7533fad7bb75ead5ae295804874ec8e5d4/leshan-lwm2m-core/src/main/java/org/eclipse/leshan/senml/cbor/upokecenter/SenMLCborPackSerDes.java#L68
I know the underlying problem is in the CBOR library, and there has been an issue opened there about it. Unfortunately it has been closed as there's a workaround available.
CBORNumber.IsNumber() is classifying many numbers as 'not number'
(I also noticed you had discussed support for Date values there and talked about tag 1: add support of Date type. — but as SenMLRecord uses BigDecimal for the time, I don't think that's really related to this issue.)
What would be the best way to get that base time value included in my SenML records?
The options I can think of:

Customize SenML/CBOR decoding on my server so that it would allow tagged values as numbers for base time. I currently use SenMLCborUpokecenterEncoderDecoder.fromSenML method to get the values, and re-creating the logic would mean replacing several classes Leshan now nicely offers me, so it would definitely be some work.

Customize SenML/CBOR decoding on my server so that it would use a Date for base time in a customized SenML record object. This would be even more work, as it would still require deserialization changes, plus custom SenMLPack and SenMLRecord classes.

Contribute a change to SenMLCborPackSerDes for handling tagged base time values in Leshan. This would involve some new steps in the part of the code I linked above, but should be rather simple, and would cause less customizations on my end. However, if I'm the first user who has ever encountered this problem, it might not be feasible to change Leshan for everybody just because of this single case.
Edit: This could actually be as small change as updating the linked code from bt.isNumber() to bt.Untag().isNumber() — but it should be checked it this caused any unwanted side effects.

Contact the author of CBOR-Java (Peter O.) and try to make that library handle such values as numbers in the future. I feel this would be the optimal choice, and I'll most likely post a comment on the earlier issue about this in the repo in any case. Based on the original message there it just seems like this might be quite a big change in the library's logic. 🤷

Any thoughts on how to address this in my device server?

Sorry for delay I was unavailable last few weeks.
I will look at this now.

After looking at it, my first bet is that your device doesn't follow the Sensor Measurement Lists (SenML) - RFC8428.
If you looked at RFC8428§4.3.  SenML Labels
You see that base time and time are encoded with Number.
And looking at RFC8428§6.  CBOR Representation :

For JSON Numbers, the CBOR representation can use integers,
floating-point numbers, or decimal fractions (CBOR Tag 4);
however, a representation SHOULD be chosen such that when the CBOR
value is converted to an IEEE double-precision, floating-point
value, it has exactly the same value as the original JSON Number
converted to that form.  For the version number, only an unsigned
integer is allowed.

Nothing about CBOR Tag 1.
Looking at example just above you will see that tag is not used for base time (-3) and time (6), which go in that way too.
Another point which go in that way, Tag is just about adding semantic, here this is not needed as we already have label which say we are talking about time. So using Tag 1 is just about making the payload 1 byte bigger for no benefits.
Let me know if it makes sense to you ?

So my advises :

At long term : report the issue to client, it should be fixed.
At mid term : add a SenMLCborPackSerDes parameter to SenMLCborUpokecenterEncoderDecoder constructor in Leshan, so you can provide a custom SenMLCborPackSerDes class which should limit the code change. (ideally for 2.0.0-M17 because I didn't plan to add new feature in 2.0.0-M16)
At short term : The only solution I see create a custom SenMLCborUpokecenterEncoderDecoder :disappointed:

Why not supporting Tag 1 for date ?
If this is really out of specification (which is what I thought for now) ==> https://github.com/eclipse-leshan/leshan/wiki/How-Leshan-should-behave-with-Non-Compliant-Implementations-%3F

This also makes me think that just ignoring the base time is a not so good behavior for SenMLCborPackSerDes which should be more strict and rise exception instead of hiding the issue.

Sorry for delay I was unavailable last few weeks.

No worries, I saw you announcing that in another discussion.
I'm on vacation now myself, so I just briefly read through your replies. I'll go through them again with care once I get back to work (5th of August). Thank you for looking into this!

Ok no problem, enjoy your vacation :wink:

[…]
Nothing about CBOR Tag 1.
Looking at example just above you will see that tag is not used for base time (-3) and time (6), which go in that way too.
Another point which go in that way, Tag is just about adding semantic, here this is not needed as we already have label which say we are talking about time. So using Tag 1 is just about making the payload 1 byte bigger for no benefits.
Let me know if it makes sense to you ?

It does. While I'm not sure if using CBOR Tag 1 is against the specification per se, it indeed seems redundant as the field itself tells the data type already. And as you wrote, the CBOR diagnostic notation example in RFC 8428 does not have tags in the time fields.

So my advises :

At long term : report the issue to client, it should be fixed.
At mid term : add a SenMLCborPackSerDes parameter to SenMLCborUpokecenterEncoderDecoder constructor in Leshan, so you can provide a custom SenMLCborPackSerDes class which should limit the code change. (ideally for 2.0.0-M17 because I didn't plan to add new feature in 2.0.0-M16)
At short term : The only solution I see create a custom SenMLCborUpokecenterEncoderDecoder 😞

I think these make sense from Leshan's point of view.
I've notified the meter manufacturer about this but didn't report an actual issue yet. I'll see if I can discuss it better with them at some point. However, as they have a bunch of meters that most likely use this approach already, they're probably not very eager to change it... But it's always worth asking, of course.
If a new constructor (or constructor parameter) could be added to SenMLCborUpokecenterEncoderDecoder for using a custom SenMLCborPackSerDes in 2.0.0-M17, that would be great! If that isn't released before I'll be really needing this, I'll consider creating a custom SenMLCborUpokecenterEncoderDecoder myself. 👍 (Right now I'm still preparing the support for the said meter so it's not in actual use yet.)

While I'm not sure if using CBOR Tag 1 is against the specification per se

For me chapter  RFC8428§6.  CBOR Representation is very clear

For JSON Numbers, the CBOR representation can use integers,
floating-point numbers, or decimal fractions (CBOR Tag 4);
however, a representation SHOULD be chosen such that when the CBOR
value is converted to an IEEE double-precision, floating-point
value, it has exactly the same value as the original JSON Number
converted to that form.  For the version number, only an unsigned
integer is allowed.

Tag 1 is not mention at all.
You can see that there is some specific line for version number (last sentence).
If Tag 1 was allowed then it should be mentioned that Tag 1 must, should or could be used for Time. But nothing about that.

If a new constructor (or constructor parameter) could be added to SenMLCborUpokecenterEncoderDecoder for using a custom SenMLCborPackSerDes in 2.0.0-M17, that would be great!

We will try to make it happened :wink:

At mid term : add a SenMLCborPackSerDes parameter to SenMLCborUpokecenterEncoderDecoder constructor in Leshan, so you can provide a custom SenMLCborPackSerDes class which should limit the code change.

I created a PR about that : https://github.com/eclipse-leshan/leshan/pull/1640

I checked the PR and tried using it quickly in my test case. Splitting the record deserialization into those small, overridable methods made it really quick and easy to override just the functionality I needed! All in all, it looks great and works perfectly in my case. 👍 Thank you! 🙂

I integrated #1640 in master, it should be available in 2.0.0-M17, so I close this issue.

I've notified the meter manufacturer about this but didn't report an actual issue yet. I'll see if I can discuss it better with them at some point. However, as they have a bunch of meters that most likely use this approach already, they're probably not very eager to change it... But it's always worth asking, of course.

Please try to insist, because I seriously think this is not allowed in SenML and so they probably don't want to face interoperability issue with their device.


[TODO]: Create a FAB that expands into a sheet

Currently, the FAB (ALFloatingActionButton) uses a normal FloatingActionButton. However, we need a FAB that can expand into a sheet like below:
https://user-images.githubusercontent.com/77159650/232284933-acf3236a-499e-4502-a846-009445d2d3f4.mp4
(Source: m3.material.io)
The options that should be shown are:

"New Project"
"Open Project" or "Import"
"Get from VCS"

This issue is no longer required as of right now because of changes to design.


Release/v4.1.9

READY FOR REVIEW

(Edit the above to reflect status)

Summary

#417

Review By (Date)

When does this need to be reviewed by?

Criticality

How critical is this PR on a 1-10 scale? Also see Severity Assessment.
E.g., it affects one site, or every site and product?

Review Tasks
Setup tasks and/or behavior to test

Check out this branch
Navigate to...
Verify...

Front End Validation

[ ] Is the markup using the appropriate semantic tags and passes HTML validation?
[ ] Cross-browser testing has been performed?
[ ] Automated accessibility scans performed?
[ ] Manual accessibility tests performed?
[ ] Design is approved by @ user?

Backend / Functional Validation
Code

[ ] Are the naming conventions following our standards?
[ ] Does the code have sufficient inline comments?
[ ] Is there anything in this code that would be hidden or hard to discover through the UI?
[ ] Are there any code smells?
[ ] Are tests provided? eg (unit, behat, or codeception)

Code security

[ ] Are all forms properly sanitized?
[ ] Any obvious security flaws or new areas for attack?

General

[ ] Is there anything included in this PR that is not related to the problem it is trying to solve?
[ ] Is the approach to the problem appropriate?

Affected Projects or Products

Does this PR impact any particular projects, products, or modules?

Associated Issues and/or People

JIRA ticket(s)
Other PRs
Any other contextual information that might be helpful (e.g., description of a bug that this PR fixes, new functionality that it adds, etc.)
Anyone who should be notified? (@mention them here)

Resources

AMP Tool
Accessibility Manual Test Script
HTML Validator
Browserstack and link to Browserstack Credentials

Let's go again @wmui51 @forrestglick - sorry my bad!

Thanks for extra push @yvonnetangsu – we appreciate your help.

Thanks for extra push @yvonnetangsu – we appreciate your help.

No problem at all - it was my fault. Lots of multitasking these couple days I must have missed adding the latest update and thought I did 😂 Sorry about that!


how do I clear the close connection in WebsocketServer?

Sir,
I have a problem. while the client close the browser, the connection still exist in the WebsocketServer.
how do I to detect the useless connections?

Hi @johnhuang669 - the server will automatically detect that the client is no longer connected when heartbeats begin failing.  Here is my console output showing the behavior.  I connected with the JS client, listed the clients, and then disconnected.  The server detected the disconnection.
D:\Code\BigQ\BigQ\BigQServerTest\bin\Debug>bigqservertest --cfg=server.json

BigQ Server Version <IP_ADDRESS>

Attempting to start/restart server using server.json
Command [? for help]:
 | Message ID 866519e1-9ace-2837-aa50-405002a10a09 Created 06/15/2017 15:31:30.0000000
 | default -> 00000000-0000-0000-0000-000000000000
 | Email default Command Login Content Type application/octet-stream SyncRequest False
 | Data: (null)

ClientConnected received notice of client login GUID default from <IP_ADDRESS>:64104

 | Message ID 815c31dd-99ec-551c-32a8-ce16b4c08ccc Created 06/15/2017 15:31:39.0000000
 | default -> 00000000-0000-0000-0000-000000000000
 | Email default Command ListClients Content Type application/octet-stream SyncRequest False
 | Data: (null)

06/15/2017 15:31:59 Warn DESKTOP-JVA27P9 thr-10       HeartbeatManager maximum number of failed heartbeats reached, abandoning client <IP_ADDRESS>:64104
06/15/2017 15:31:59 Warn DESKTOP-JVA27P9 thr-10        ServerLeaveEvent no clients found on server

Heartbeat is  demo data??

Hi @johnhuang669 heartbeat is on my default, contains null data, and is only used to detect if the connection is still open.  Is it working for you now?  Cheers!

See line 1016: https://github.com/bigqio/bigq/blob/master/BigQ/Server.cs

yes,it' working for me now!
I have to test how many clients connect to the server will cause crash...

Awesome, glad it's working @johnhuang669 - thanks for letting me know :)  Closing this one.


Chapter 0, Chapter 8 and Event Italian translation

Here the first sections translated into italian as part of #170 :

chapter 0
events

@MKhalusova please review

Added chapter 8

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

The translated chapters are built correctly and look ok to me, but I do not speak Italian. Do you know another community member who could review the translation?

I'll ask around


How to easily set node-specific font colors?

Thank you for this excellent library! It's easy to use and pretty comprehensive for my needs.
I have one question: To change the font color for a specific node, do I have to use the HTML styling as the documentation says? Like this one
using GiGraph.Dot.Extensions;

graph.Nodes.Add("Foo", node =>
{
    node.Shape = DotNodeShape.Rectangle;
    node.Label = @"• Foo Bar
Baz".AsHtml();
});

If so, that seems to force me to rewrite the Label field. However, I only want to style the node.
Is there a field that I failed to find?

Figured it out myself:
node.Attributes.Collection.Set("fontcolor", myColor);

Glad you wrote! :) Your final solution is correct, but this way you omit the abstraction the library gives you, and provide Graphviz attribute names directly. You can simply do it this way:
node.Font.Color = Color.Red
As long as you only want to adjust the color of the whole label, this is fine. You can generally do the following with the label:

set font color, font size and font name (for the complete text, not its parts),
left- or right-justify individual lines of text, or center them.

When you want to have more granular control on pieces of text, you can use HTML (see here).

Thanks a lot. How could I miss that? lol


Exception has occurred: CLR/System.Exception

I got this error while trying to run chapter03 sample :
An unhandled exception of type 'System.Exception' occurred in System.Private.CoreLib.dll: 'Could not resolve a service of type 'System.Text.Json.JsonSerializerOptions' for the parameter 'serializerOptions' of method 'Configure' on type 'sample.microservice.reservation.Startup'.'
 Inner exceptions found, see $exception in variables window for more details.
 Innermost exception 	 System.InvalidOperationException : No service for type 'System.Text.Json.JsonSerializerOptions' has been registered.
   at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
   at Microsoft.AspNetCore.Hosting.ConfigureBuilder.Invoke(Object instance, IApplicationBuilder builder)

The same for me.
Adding
services.AddSingleton();
in ConfigureServices in Startup.cs the error is gone, but i'm not sure if is the best approach

Can you verify if these changes fixes it for you? In /chapter03/sample.microservice.reservation/Startup.cs I changed the method ConfigureServices to the following:
public void ConfigureServices(IServiceCollection services)
        {
            services.AddDaprClient();

            services.AddSingleton(new JsonSerializerOptions()
            {
                PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
                PropertyNameCaseInsensitive = true,
            });
        }

With this change, also launching the VS Code debug configuration ".NET Core Launch w/Dapr (reservation)" works as expected.

Can you verify if these changes fixes it for you? In /chapter03/sample.microservice.reservation/Startup.cs I changed the method ConfigureServices to the following:
public void ConfigureServices(IServiceCollection services)
        {
            services.AddDaprClient();

            services.AddSingleton(new JsonSerializerOptions()
            {
                PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
                PropertyNameCaseInsensitive = true,
            });
        }

With this change, also launching the VS Code debug configuration ".NET Core Launch w/Dapr (reservation)" works as expected.


digitalocean: Pass user agent string to godo client.

Pull Request Motivation
This PR sets a custom user agent string when initializing the godo client for the DigitalOcean issuer. It's a general best practice for clients to identify themselves. As one of the maintainers of godo, it helps us to better understand how it is being used. It should help enable DigitalOcean to better support their customers using cert-manager.
Kind

Release Note
The DigitalOcean issuer now sets a cert-manager user agent string.

/ok-to-test


Redesign pages in camicSignup/

missed when looking earlier, redesign these pages

Blocked from testing currently due to lack of knowledge of default credentials when hosted

Admin/Add User and Admin Password page done in 5cea733f27f46f827036dd4d314b803aa74c7ff9

user list page done (prelim) in 434d61d3c221e9104fd4bf2c032c3626b6329c5d
Still need to and cannot test

solved with f9384f12bb8a7f1186124410405a214667186d81


Playwright consistently captures a 404 request code despite the successful loading of the product on Target(retailer website).

``I aim to scrape products from Target, utilizing Scrapy, which has proven effective for retailers like Amazon and Walmart. However, I am encountering a challenge with Target. Despite the product page loading successfully, the Target website responds with a status code 404. Investigation in the browser's Inspection -> Network tab also reveals a 404 status.
I attempted to use Scrapy Playwright to load the website in a browser and then scrape, but the issue persists.
For a clearer understanding, please refer to this brief video: Link to Video.
Here is the code I used.
import datetime
import re
from scrapy.http import HtmlResponse
from .base_redis_spider import BaseRedisSpider
from ..enums.globals import RETAILERS, Component

class TargetSearchProductSpider(BaseRedisSpider):
    custom_settings = {'ITEM_PIPELINES': {"scrapers.pipelines.timestamp_pipeline.TimeStampPipeline": 400,
                                          "scrapers.pipelines.redis_item_store_pipeline.RedisItemStoragePipeline": 501, },
                       # add timestamp to item
                       "DOWNLOAD_HANDLERS": {"http": "scrapy_playwright.handler.ScrapyPlaywrightDownloadHandler",
                                             "https": "scrapy_playwright.handler.ScrapyPlaywrightDownloadHandler", },
                       "PLAYWRIGHT_BROWSER_TYPE": "firefox", "HTTPERROR_ALLOWED_CODES": [404],
                       "PLAYWRIGHT_LAUNCH_OPTIONS": {"headless": False}

                       }
    name = "target"

    def generate_key(self):
        return f"{self.retailer.lower()}_{self.component.lower()}_{self.environment.lower()}"

    def __init__(self, *args, **kwargs):
        super(TargetSearchProductSpider, self).__init__(*args, **kwargs)

        self.retailer = RETAILERS.TARGET
        self.environment = kwargs.get('environment').upper()
        self.component = kwargs.get('component').upper()
        self.spider_key = self.generate_key()  # 'target_retail_production'

        self.redis_key = f"{self.spider_key}:start_urls"
        self.redis_batch_size = 1  # Number of url to fetch from redis on each attempt
        self.max_idle_time = 60  # Max idle time(in seconds) before the spider stops checking redis and shuts down

    def modify_request(self, request):
        return request.replace(meta={'playwright': True, 'playwright_include_page': True}, callback=self.parse,
                               errback=self.errback)

    def parse(self, response, **kwargs):
        # Get the Playwright browser instance from the response.meta dictionary
        browser = response.meta['playwright_browser']
        # ...other logic ...
        await self.close_browser(browser)
        yield {}

    async def errback(self, failure):
        self.logger.error(repr(failure))
        # Get the Playwright browser instance from the response.meta dictionary
        browser = failure.request.meta['playwright_browser']
        # Close the browser
        await browser.close()

@elacuesta thanks for the clarification.


Order columns in Table Brick

The table columns in the component do not match the order when the table is created and the order also does not match the list in the app script. It would be helpful to be able to determine the sequence of columns.

I've taken a couple of shots at this and haven't been able to quite get it yet. Will try again, at least for the components/bricks case, we should be able to do this.

This should be fixed (for components at least) in palladio-table-component#1.1.1


Feature request module imports

I would like to humbly request exposing the Module imports function that lists the required imports for a Module.
It looks like the functionality I'm looking for is provided by the func_wrap, and instantiate methods on the Linker.

Looks like the functionality I'm looking for is already provided by the func_wrap function on the Linker which would need to be exposed.

@bpajama this should have been addressed by https://github.com/kawamuray/wasmtime-java/pull/31 right?


Issue with Android Instrumentation for OkHttp

Hello. I'm having some issues to use Open telemetry in my android app. Because I want to track every request as a span, I followed the instructions here
I took a look at the code and I figured out I need to setup my OpenTelemetry instance at GlobalOpenTelemetry to make it works. Let me know if I miss understood it.
The first time I load the app, usually I have no problem. But If I kill the app and open it again, the SDK throws an exception.
Here is the exception.
java.lang.IllegalStateException: GlobalOpenTelemetry.set has already been called. GlobalOpenTelemetry.set must be called only once before any calls to GlobalOpenTelemetry.get. If you are
using the OpenTelemetrySdk, use OpenTelemetrySdkBuilder.buildAndRegisterGlobal instead. Previous invocation set to cause of this exception.
14:12:35.926  W  	at io.opentelemetry.api.GlobalOpenTelemetry.set(GlobalOpenTelemetry.java:107)
14:12:35.927  W  	at io.opentelemetry.api.GlobalOpenTelemetry.set(GlobalOpenTelemetry.java:115)
14:12:35.927  W  	at io.opentelemetry.api.GlobalOpenTelemetry.get(GlobalOpenTelemetry.java:85)
14:12:35.927  W  	at io.opentelemetry.instrumentation.library.okhttp.v3_0.internal.OkHttp3Singletons.lambda$static$2(OkHttp3Singletons.java:43)
14:12:35.927  W  	at io.opentelemetry.instrumentation.library.okhttp.v3_0.internal.OkHttp3Singletons$$ExternalSyntheticLambda2.get(D8$$SyntheticClass:0)
14:12:35.928  W  	at io.opentelemetry.instrumentation.library.okhttp.v3_0.internal.CachedSupplier.get(CachedSupplier.java:31)
14:12:35.928  W  	at io.opentelemetry.instrumentation.library.okhttp.v3_0.internal.OkHttp3Singletons.lambda$static$5(OkHttp3Singletons.java:86)
14:12:35.928  W  	at io.opentelemetry.instrumentation.library.okhttp.v3_0.internal.OkHttp3Singletons$$ExternalSyntheticLambda5.get(D8$$SyntheticClass:0)
14:12:35.928  W  	at io.opentelemetry.instrumentation.library.okhttp.v3_0.internal.CachedSupplier.get(CachedSupplier.java:31)
14:12:35.928  W  	at io.opentelemetry.instrumentation.library.okhttp.v3_0.internal.LazyInterceptor.intercept(LazyInterceptor.java:27)
14:12:35.928  W  	at io.opentelemetry.instrumentation.library.okhttp.v3_0.internal.OkHttp3Singletons.lambda$static$4(OkHttp3Singletons.java:79)
14:12:35.928  W  	at io.opentelemetry.instrumentation.library.okhttp.v3_0.internal.OkHttp3Singletons$$ExternalSyntheticLambda4.intercept(D8$$SyntheticClass:0)
14:12:35.928  W  	at io.opentelemetry.instrumentation.library.okhttp.v3_0.internal.OkHttp3Singletons.lambda$static$3(OkHttp3Singletons.java:72)
14:12:35.929  W  	at io.opentelemetry.instrumentation.library.okhttp.v3_0.internal.OkHttp3Singletons$$ExternalSyntheticLambda3.intercept(D8$$SyntheticClass:0)

Version: 0.7.0-alpha-SNAPSHOT (main branch)

My code
fun init(application: Application, deviceInfo: String) {

        val config = createOtelRumConfig()
        val otlpExporter = createOtlpHttpSpanExporter(header = deviceInfo)
        val filteringSpanExporter = createFilterExporter(otlpExporter)

        val openTelemetryRumBuilder = OpenTelemetryRum.builder(application, config).apply {
            mergeResource(createResource())
            addTracerProviderCustomizer { tracerProviderBuilder: SdkTracerProviderBuilder, app: Application? ->
                tracerProviderBuilder.apply {
                    val batchSpanProcessor = BatchSpanProcessor.builder(filteringSpanExporter)
                        .build()
                    addSpanProcessor(batchSpanProcessor)
                }
            }
        }

        try {
            openTelemetryRumBuilder.build().apply {
                GlobalOpenTelemetry.set(openTelemetry)
            }
        } catch (e: Exception) {
            e.printStackTrace()
        }
    }

Looks like the GlobalOpenTelemetry.get() inside of OkHttp3Singletons is called before I setup my OpenTelemtry instance on Application class. It may happens because I initiated the koin (DI framework) before to fire the OpenTelemetry setup. I use Koin to create/provide instances of OkHttp clients and the OpenTelemetry I setup by hand in my Application class.
The GlobalOpenTelemetry.get sets OpenTelemetry.noop() and when I try to set the right instance it throws an exception and then I cant setup the OkHttp3Singletons again and I'm not able to retrieve the spans...
What I can do to handle it?

Hi! OkHttp3Singletons takes care of calling GlobalOpenTelemetry.get() as you mentioned, although it does so lazily the first time the OkHttp interceptor is run. So it seems like somewhere in your application there's an HTTP request happening before the OTel RUM instance has finished initializing.
It should be ok to create your own instance of OkHttp beforehand, the problem comes if that instance (or any OkHttp instance for that matter) is used to make requests before OTel is done initializing. So I think one thing we could verify is where is your app making its first HTTP request (using OkHttp) and try to initialize OTel before that.
Another reason might be that GlobalOpenTelemetry.get() is called elsewhere though, probably not even related to OkHttp's interceptors, so it's a bit tricky to rely on this singleton because it might happen even in code that doesn't belong in your app (maybe some dependency calling it at some point), because of this, I think we should ideally avoid using GlobalOpenTelemetry altogether. We're currently working on an instrumentation API that will help with propagating the OpenTelemetry RUM instance to all instrumentations without having to rely on GlobalOpenTelemetry, I'm not sure how feasible it will be for this particular OkHttp instrumentation though, but I'm planning to take a look at it. For now, all I could recommend is to make sure that no HTTP requests are triggered before the OTel RUM instance is ready.

I saw another way to do the instrumenting of OkHttp clients using OkHttpTelemetry but it requires to change the way we get the endpoints through retrofit builder. And I also need to do a lot of changes in the app side...
I will follow your recommendation and I will keep close to see new ways to do the instrumentation of OkHttp clients.

Just an update. I've tried avoid any HTTP request be called before OTel RUM instance be ready but it didn't work. I've noticed before, there were some spans related with third-party libs that may use OkHttp lib... Maybe those libraries are messing something.... Is possible to automaticaly instrument only my OkHttp clients?

I see, it seems like you might have some dependencies making HTTP requests before your app.onCreate runs which could definitely cause troubles as the code that adds the OTel interceptors is added into the OkHttpClient builder itself, affecting all OkHttpClient instances.
For now is not possible to make the automatic instrumentation cover only one OkHttp instance, and I'm not sure if said feature might be a good idea in case you wanted to get visibility on all the HTTP traffic that your app handles, though you can still implement it manually into your own OkHttp instance while turning off the automatic instrumentation, it does affect the way other parts of your app are setup though, as you've mentioned, but right now is the only option. In the meantime, I'm planning to find a way to prevent the automatic instrumentation using GlobalOpenTelemetry to avoid these kinds of issues in the future.


Observable drop long

See https://github.com/monix/monix/issues/1072

Thanks for PR @gclaramunt sorry for not following up on it earlier
Unfortunately the change is not binary compatible so we can't replace it until 4.x
I don't remember the issue about the overloads, I will try to dig it up
I suppose we are stuck with separate method name unless we can find a way to make it compatible

Ah, sorry I missed the binary check... I'll try to check the issue too, it might not be a big deal.
Otherwise, I'll change it to dropLong

Here are the issues with overloading: https://stackoverflow.com/questions/2510108/why-avoid-method-overloading but I've tested and it doesn't happen with Int and Long (it picks int).
Still, it might be risky ... let me know if you want to got with dropLong or something else

cool, thanks! :)


Reflect SMT patterns in ``comp_view for C_Lemma

Hi,
This pull request just adds a third argument to the comp_view constructor C_Lemma, so that one can inspect the SMTPat of lemmas, and craft lemmas with SMT patterns.

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.:x: W95Psp sign nowYou have signed the CLA already but the status is still pending? Let us recheck it.

Hi Lucas, thanks for the PR! And sorry for the delay, I've only now seen it (feel free to tag me in Meta-F* related things!).
It looks good to me, I'm merging some stuff I had backlogged and then will merge this one. Have you been using this feature successfully? If you have a simple test file I could add it as a regression test.
Thanks again!

Hi, thanks for merging! :)
Yes, I'm using this feature ; when I have some time, I can make a small test file, I'll make a PR!


makes cert-manager apiVersion configurable

This commit let's users override the apiVersion referenced in this
chart so that the chart can be used with newer cert-manager releases.
(script/cert-manager/install-cert-manager.sh installs 0.13.0 when
current version is 1.2.0...)
Fixes #68
Motivation
cert-manager apiVersion changed after cert-manager 1.0.0 was released, which prevents the chart from provisionning certificates with newer cert-manager installation because of an incompatible apiVersion.
I have a cluster with cert-manager >1.0.0 installed, making apiVersion overridable makes it easy for me to install pulsar on that cluster
Modifications
I introduced the value certs.internal_issuer.apiVersion, which by default uses the apiVersion that was previously hardcoded (cert-manager.io/v1alpha2)
I replaced all occurrences of that apiVersion by a reference to the value so that users can override it to cert-manager.io/v1 if they have a newer version of cert-manager installed.
Verifying this change

[x] Make sure that the change passes the CI checks.

Any chance we get that PR merged?

@sijie thank you !


Added default parameter value for Skin.get

Closes #188
Skin.get was an infix method. I'm not sure how useful that is... why would someone choose the infix syntax over the bracket syntax? It prevented adding default parameter values so I removed it and update the tests and changelog.

Agreed, infix operator was excessive. Thanks for the PR.


Add 'latest' option to mirroring script

What this PR does / why we need it:
Allow one to run go run ./cmd/aro mirror latest instead of specifying a release image.
Test plan for issue:
Run manually
Is there any documentation that needs to be updated for this PR?
Yes - will update as part of #1406

Looks good ->
[bvesel ARO-RP]$ go run ./cmd/aro mirror latest
INFO[2021-03-25T20:02:26Z]cmd/aro/main.go:47 main.main() starting, git commit unknown
INFO[2021-03-25T20:02:26Z]pkg/env/core.go:70 env.NewCoreForCI() running in production mode
INFO[2021-03-25T20:02:26Z]cmd/aro/mirror.go:96 main.mirror() mirroring release 4.6.17
INFO[2021-03-25T20:02:26Z]pkg/mirror/mirror.go:58 mirror.Mirror() reading imagestream from quay.io/openshift-release-dev/ocp-release@sha256:a7b23f38d1e5be975a6b516739689673011bdfa59a7158dc6ca36cefae169c18
INFO[2021-03-25T20:02:29Z]pkg/mirror/mirror.go:99 mirror.Mirror() mirroring 121 image(s)


Sinon useFakeTimers causes init to hang

Software versions

OS: all
Node Version: all

Expected behaviour
Pact is unaffected by usage of sinon.useFakeTimers()
Actual behaviour
AbstractService#__waitForServiceUp() promise never resolves. The setTimeouts used in this (and other) functions never fire their callbacks.
Steps to reproduce
https://gist.github.com/iknowcss/356d449b96cf44a9a70c70adde7a8ce6
Relevant log files
N/a

Thanks @iknowcss. I'm reticent to put things in here / change things as a result of the internals of how other frameworks behave. That being said, Sinon/Jest/other frameworks that use Sinon are quite common, and likely to cause issues for others. So if the change required to support them is maintainable etc. then i'm certainly open to discussion.

@mefellows yeah, I can definitely see where you're coming from. Practically speaking I'm not sure what other options we have. At the moment Pact fails without warning or any indication of the cause of the issue.
The only other way I can think to do this is to use a library which will wait for a condition (like the Pact server being up and running) rather than use setTimeout. And I'm sure that library will basically do this exact thing under the covers anyway.

What use case do you have for useFakeTimers in a Pact test? I'm asking because my gut feel is that fake timers would belong to a layer better tested by pure unit tests.

Here is a simplified version of how we use sinon.useFakeTimers() to stub Date.now() in our test:
const nowTimestamp = new Date('Feb 07 2018 12:34:56.789 GMT+1100').getTime();
let clock;

before(async () => {
  clock = sinon.useFakeTimers(nowTimestamp);
  await provider.setup();
});

it('retrieves products', async () => {
  await provider.addInteraction({
    state: 'default',
    uponReceiving: 'a request for products',
    withRequest: {
      method: 'POST',
      path: '/base/path/fake/url',
      headers: { 'Content-Type': 'application/json' },
      body: {
        abn,
        fromTimestamp:<PHONE_NUMBER>000,
        toTimestamp:<PHONE_NUMBER>000
      }
    },
    willRespondWith: {
      headers: { 'Content-Type': 'application/json' },
      status: 200,
      body: {
        product: [
          { pnr: 'MV3VX8' },
          { pnr: 'TSH8SC' }
        ],
        checkpoint: new Date('Mar 10 2018 12:00:01 GMT+1100').getTime()
      }
    }
  });

  const result = await expect(retrieveCompanyBookings('12345678901')).to.be.fulfilled;

  await provider.verify();
  expect(result).to.deep.eql({
    product: [
      { pnr: 'MV3VX8' },
      { pnr: 'TSH8SC' }
    ],
    checkpoint: new Date('Mar 10 2018 12:00:01 GMT+1100').getTime(),
    channels: ['foo', 'bar']
  });
});

after(async () => {
  clock.restore();
  await provider.finalize();
});

I believe my problem would be solved by moving the sinon.useFakeTimers() to after the point where I add the interaction. Or by not testing this logic using pact. But again I worry about others being affected by this and not understanding why.

I think your code seems like a reasonable place to be using Date.now().
If it really is a one line change as in #112, and doesn't impact anything else, I'm for this.
Are there other time mocking approaches that we would also fail with?
Whatever we do here, I think it's worth a documentation change, too - if pact-node doesn't work if setTimeout is mocked, we should document that. If it ignores mocking (as in your PR), I think we should document that, too.
Good catch!

To my knowledge any time mocking that overwrites setTimeout would affect us. Any other type of time mocking would not affect this project.
Would you like me to put in some documentation in my PR?

I'm not sure I understand the issue here and why you need fake timers at all.  If you're using your pact tests to do both unit testing and contract testing, you're going to have a bad time when it comes to the minutiae of your business logic, hence the problem you seem to be hitting right now since sinon is meant to be used for unit testing, testing a single function's inputs and outputs.
My suggestion is that leave the contract testing to test properties, value types, etc, but without looking too deep at the value it's returning since that kind of detail is better represented in a unit test.

Hi @mboudreau, yeah, you're right that I can solve this particular problem without fake timers. However, I'm not sure it's safe to assume that Pact will be done outside of the context of unit testing. The Pact Best Practices explicitly state "Use Pact for isolated (unit) tests to test the class(es) that will be responsible for making the HTTP calls from your Consumer", which is what we are talking about here.
There's a high likelyhood that Pact users will have some mocking library in the mix. If they choose to mock the clock (as I did), they're going to be burned by the same problem. The dangerous thing is that, when that happens, they won't understand that useFakeTimers() is the cause of their grief. Given this, if we want to have a good developer experience, we really only have 2 options:

Detect for clock mocking and tell the user not to do that (which would require us to grab references to the global clock functions to make the comparison, plus logic to check every time we call one of these dangerous functions and then print to console) or
Guard against the problem: reference the clock functions at init and use those references instead of the global mutable ones

It still doesn't stop people from mocking it before pact is required. What
you're hitting is a javascript limitation mixed with how you're doing
things. People can go ahead and change some of the globals, but that's at
their own peril and we really can't stop them from breaking the pact
workflow if they really wanted to.
Pact has been around for years now and this is the first time I've heard of
this issue.
Personally, I would never change javascript globals during a test, if your
test needs to change globals for it to work, I would suggest that you allow
your class to be able to inject your own version of setTimeout or use a
library like rewire to change it when testing. The reason for this is that
you can't assume while testing that any of you're libraries you're
dependent on isn't using the global you're about to modify. If this breaks
with pact, it will probably break with other libraries as well. As such,
you can't impose on our standalone library to change our code simply
because you're changing javascript globals.
I hope you understand. Cheers.
On Wed., 29 Aug. 2018, 12:04 pm Cody Jenkins<EMAIL_ADDRESS>wrote:

Hi @mboudreau https://github.com/mboudreau, yeah, you're right that I
can solve this particular problem without fake timers. However, I'm not
sure it's safe to assume that Pact will be done outside of the context of
unit testing. The Pact Best Practices
https://docs.pact.io/best_practices/consumer#use-pact-for-isolated-unit-tests
explicitly state "Use Pact for isolated (unit) tests to test the class(es)
that will be responsible for making the HTTP calls from your Consumer",
which is what we are talking about here.
There's a high likelyhood that Pact users will have some mocking library
in the mix. If they choose to mock the clock (as I did), they're going to
be burned by the same problem. The dangerous thing is that, when that
happens, they won't understand that useFakeTimers() is the cause of their
grief. Given this, if we want to have a good developer experience, we
really only have 2 options:

Detect for clock mocking and tell the user not to do that (which
would require us to grab references to the global clock functions to make
the comparison, plus logic to check every time we call one of these
dangerous functions and then print to console) or
Guard against the problem: reference the clock functions at init
and use those references instead of the global mutable ones

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/pact-foundation/pact-node/issues/110#issuecomment-416798569,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAjA5BZzowL3evK2hXJQkHUfBuS9QqDbks5uVfaQgaJpZM4WI0WX
.

I 100% agree with your logic about not changing globals - but I do think that it's good for Pact to play nicely with other common testing frameworks (sinon is reasonably popular).
We might not agree with the philosophy of sinon, but I think it's best for Pact adoption if Pact "just works" with common testing frameworks.
Since a call to useFakeTimers() would always come after pact initialises, keeping our own reference would solve the problem - without any clear downsides (except needing to remember not to use the global directly, but that's easily handled with a lint rule).
I thought the usecase of an API request including a field calculated using the client time was reasonable, and sinon.useFakeTimers() was a reasonable way to write a pact test for that request (if you want to use sinon). So, if we don't make any code changes, I think it's worth at least adding a note to the documentation that pact will hang if you're using sinon.useFakeTimers(), if only to prevent people spending time digging to find the cause.
But from the perspective of increasing pact adoption, I think the one-line fix in #112 (plus a lint rule to prevent accidentally using the global directly) would be a better way to solve this.
If we can play nicely with Sinon, surely we should?

@TimothyJones I'm not convinced of that argument.  Just because a semi-popular mocking library decides to implement something that breaks the world, I fail to see how that's our responsibility to support that.  We do play nicely with Sinon for literally everything else, except something that changes globals, which is kind of the point it's trying to make here.
There are better ways to achieve this without a singular scope.  By default Sinon replaces the global target, but there's no reason to be a lot more specific in it's usage as to not affect any libraries that are required.
Furthermore, even if we add global.setTimeout to our codebase, it still doesn't prevent the developer from overriding the globals before the require happens, something that I do quite often by clearing out the require cache and re-requiring the file to completely start anew properly and not have tests affect each other's state.
If the developer is trying to test out their own timers, they can do that within their own codebase without affecting the globals fairly easily.  If it's not our library that will break, it will be another.

Further to this, I wondered if we could detect that the clock had been replaced and at least throw a helpful error - even if we could only detect sinon's clock replacement.
I looked through the sinon docs and source, and couldn't find anything directly helpful. I might open an issue with them.


Audio splitter

Topic: audio_splitter

Reviews in this chain:
└https://github.com/riffusion/riffusion/pull/62 Audio splitter
　└https://github.com/riffusion/riffusion/pull/63 Audio to audio

#
head
base
diff
date
summary

0
94d5fb2b
bfeb3279
diff
Jan 5 4:54 AM
6 files changed, 200 insertions(+), 2 deletions(-)


Document how to use group to place commands out of the context menu and into the item they belong to

Not sure what the idea of this change is. Groups try to use some naming rules but must not always. There is some doc here: https://code.visualstudio.com/docs/extensionAPI/extension-points#_sorting-of-groups

I found randomly in a GitHub issue is not mentioned in it. Is it out of date?

Yeah, maybe but it also depends on the part of VS Code... Updating the doc is always a manual process and hence error-some.

In that context this PR is woefully incomplete, then, so I'm going to close it.


Doesn't support 'learn.microsoft.com'

After a recent change by Microsoft, docs.microsoft.com - is being redirected to: learn.microsoft.com (supposedly, the creator IDs are still supported) but this extension doesn't currently include the learn.microsoft.com.

Hi @lukemurraynz,
I was waiting for Microsoft to confirm that learn.microsoft.com is tracked by the skilling champion program. It looks like that this is the case. This issue is fixed with PR #32 . I already released the versions to the chrome, edge and firefox marketplaces - it will take a little bit until they validate it....
Best regards,
Martin


Add rewrite packed structs pass

Motivation
packed structs would get the alignment of its biggest size type, so when we pass them as input buffers. they need to align with its total size as we will need to store them in runtime arrays which we will need to assign an array stride for them. eg: <{i32, i8}> struct will have an alignment of 4 and a size of 5, when we store it inside a runtime array, we need to assign an array stride of 5 to the runtime array. This will fail in validation as the array stride(5) need to align with struct alignment(4).
PR changes

Add RewritePackeStructsPass which will reduce alignment of packed structs by converting the input buffer struct type to a struct of array of i8 with equal size. This pass handles opaque and non-opaque pointers:

For opaque pointers: We store a zero values of the equivalent struct type inside the input buffer ptr (We do that to make opaque pointer type deduced as of the type that we need). We also allocate a local ptr of the same original struct type of the input buffer, and replace all uses inside the kernel with our allocated ptr. At the end of the function, we extract each 8 bits from our allocated ptr and assign this 8 bits to the input buffer i8 array.
For non-opaque pointers: We change the signature of the kernel function and replace the input buffer type to our new struct type. We bitcast the input buffer from the new struct type to the original struct type. And, we replace all uses of the input buffer inside the function to the bitcasted value.

Add -rewrite-packed-struct option to trigger the pass.
Add some tests for the pass.

Note: We need to have -int8 option enabled to process the pass.
This fixes the CTS test: spirv_new/decorate_cpacked
This contribution is being made by Codeplay on behalf of Samsung.

Should we also consider doing the same thing for structure on which we tried to store an element smaller than its element size?
At the moment, it emits a llvm_unreachable (https://github.com/google/clspv/blob/main/lib/ReplacePointerBitcastPass.cpp#L429) when we try to do that. I don't think I have seen it in the CTS yet.

Have you tested the interactions with -constant-args-ubo?

I tried testing that but as of my understanding that -constant-args-ubo works with constant buffers and add some padding to structs to align them properly and if constant args are passed in a wrong way would give that frontend error: clspv restriction: UBO element size must be a multiple of that element's alignment. which this restriction would make rewrite-packed-structs not work on the struct as the struct will be already properly aligned with its size. so, I guess there is no conflict between the 2 options.

Would it simply be a case of requiring scalar block layout to work?

Scalar block layout should still give the struct the alignment of the biggest type inside of it. which would still conflict with the arraystride of the runtime array that we assign as a wrapper to the buffer. So, as of my understanding it won't fix the problem of having a packed struct that is not aligned with its size.

Should we also consider doing the same thing for structure on which we tried to store an element smaller than its element size?
At the moment, it emits a llvm_unreachable (https://github.com/google/clspv/blob/main/lib/ReplacePointerBitcastPass.cpp#L429) when we try to do that. I don't think I have seen it in the CTS yet.

We would still need to truncate some of the data if we tried to do that I think. So, I guess we could do that while giving a warning that data will be truncated.


Migrate to Next App Router

Migrates to Next app router

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 81.45%. Comparing base (9125660) to head (3bd479c).
Report is 33 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #449      +/-   ##
==========================================
- Coverage   86.46%   81.45%   -5.02%
==========================================
  Files         178      198      +20
  Lines        6873     8239    +1366
==========================================
+ Hits         5943     6711     +768
- Misses        930     1528     +598

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


js packaging

v0.7.4
JS Packaging working as expected at last
Updated doc and generator for stimulus 3

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

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

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
273

Relevant Lines:
273

💛  - Coveralls


Slide puzzles too slow

Slide puzzles work, but they are very slow to randomly generate.  For now might have to have some hard coded options.
Split from #37

Hard coded for now.


Implement endpoints to edit course creation requests

Subtask to set up the backend endpoints for the user story defined at https://github.com/JamesPartsafas/ConcordiaCurriculumManager/issues/7
Create endpoint so users can edit create course requests
[Story Points: 2]
[Priority: High]
[Risk: Medium]

demo


Starting 'inline'... Unhandled rejection TypeError: __html.replace is not a function

New foundation installation.
` master@master  /var/www/foundation-git/project   master  npm run build

<EMAIL_ADDRESS>build /var/www/foundation-git/project
gulp --production

[15:00:49] Failed to load external module @babel/register
[15:00:49] Requiring external module babel-register
[15:00:50] Using gulpfile /var/www/foundation-git/project/gulpfile.babel.js
[15:00:50] Starting 'default'...
[15:00:50] Starting 'build'...
[15:00:50] Starting 'clean'...
[15:00:50] Finished 'clean' after 35 ms
[15:00:50] Starting 'pages'...
[15:00:50] Finished 'pages' after 469 ms
[15:00:50] Starting 'sass'...
[15:00:51] Finished 'sass' after 767 ms
[15:00:51] Starting 'images'...
[15:00:51] gulp-imagemin: Minified 0 images
[15:00:51] Finished 'images' after 56 ms
[15:00:51] Starting 'inline'...
Unhandled rejection TypeError: __html.replace is not a function
at /var/www/foundation-git/project/node_modules/list-stylesheets/index.js:27:33
at Array.forEach ()
at encodeCodeBlocks (/var/www/foundation-git/project/node_modules/list-stylesheets/index.js:24:33)
at encodeEntities (/var/www/foundation-git/project/node_modules/list-stylesheets/index.js:45:20)
at module.exports (/var/www/foundation-git/project/node_modules/list-stylesheets/index.js:52:22)
at module.exports (/var/www/foundation-git/project/node_modules/extract-css/index.js:11:16)
at /var/www/foundation-git/project/node_modules/inline-css/lib/inlineContent.js:15:9
at Promise._execute (/var/www/foundation-git/project/node_modules/bluebird/js/release/debuggability.js:303:9)
at Promise._resolveFromExecutor (/var/www/foundation-git/project/node_modules/bluebird/js/release/promise.js:483:18)
at new Promise (/var/www/foundation-git/project/node_modules/bluebird/js/release/promise.js:79:10)
at inlineContent (/var/www/foundation-git/project/node_modules/inline-css/lib/inlineContent.js:8:12)
at /var/www/foundation-git/project/node_modules/inline-css/index.js:31:9
at Promise._execute (/var/www/foundation-git/project/node_modules/bluebird/js/release/debuggability.js:303:9)
at Promise._resolveFromExecutor (/var/www/foundation-git/project/node_modules/bluebird/js/release/promise.js:483:18)
at new Promise (/var/www/foundation-git/project/node_modules/bluebird/js/release/promise.js:79:10)
at module.exports (/var/www/foundation-git/project/node_modules/inline-css/index.js:8:12)
at DestroyableTransform._transform (/var/www/foundation-git/project/node_modules/gulp-inline-css/index.js:28:9)
at DestroyableTransform.Transform._read (/var/www/foundation-git/project/node_modules/readable-stream/lib/_stream_transform.js:184:10)
at DestroyableTransform.Transform._write (/var/www/foundation-git/project/node_modules/readable-stream/lib/_stream_transform.js:172:83)
at doWrite (/var/www/foundation-git/project/node_modules/readable-stream/lib/_stream_writable.js:418:64)
at writeOrBuffer (/var/www/foundation-git/project/node_modules/readable-stream/lib/_stream_writable.js:407:5)
at DestroyableTransform.Writable.write (/var/www/foundation-git/project/node_modules/readable-stream/lib/_stream_writable.js:334:11)
[15:00:51] The following tasks did not complete: default, build, inline
[15:00:51] Did you forget to signal async completion?
master@master  /var/www/foundation-git/project   master  node -v
v9.7.1
master@master  /var/www/foundation-git/project   master  npm -v
5.7.1`
But npm start task works, seems something wrong with inline gulp task

Yeah, the same problem

The problem seems to be on the list-stylesheets plugins. I went to node_modules/list-stylesheets/index.js and put a try-catch block around __html.replace, so
                try {
                    __html = __html.replace(re, function (match) {
                        codeBlockLookup.push(match);
                        return 'EXCS_CODE_BLOCK_' + (codeBlockLookup.length - 1) + '_';
                    });
                } catch(e) {}

I'm not sure if this makes any difference on the output, but it supressed the error and at least now I have an inline HTML.

Fix is available.
https://github.com/jonkemp/gulp-inline-css/releases/tag/v3.1.3

I would think so. Updating to the latest version of the plugin fixes the issue.

I would recommend adding a lockfile though, which would have prevented this from happening. The lockfile can be generated with yarn or npm 5. I'll create a separate issue for this.

This would not prevent this.

I'm not sure about that. Or my understanding of lockfiles is flawed.
https://docs.npmjs.com/files/package-locks

It is highly recommended you commit the generated package lock to source control: this will allow anyone else on your team, your deployments, your CI/continuous integration, and anyone else who runs npm install in your package source to get the exact same dependency tree that you were developing on. Additionally, the diffs from these changes are human-readable and will inform you of any changes npm has made to your node_modules, so you can notice if any transitive dependencies were updated, hoisted, etc.

Ah, I see what you mean.

Closing as we did not receivy any further feedback.


Add no-parser entry to the Rollup build

This is my attempt to make @philpl valiant effort on the prepossessing feature benefit the Rollup goodness.
The parsed size shrinked from 32.6kB to 23.9kB, and the gziped size from 15.2kB to 8.4kB :tada:
However, I have no idea how to make webpack aware of the es module, since the module field in package.json is only for the main entry. I tried finding some online resource with no success, this my first time dealing with npm packages, any guidance on this will be appreciated.
To make it work I changed module.exports = require('./lib/no-parser') to module.exports = require('./dist/no-parser') in /no-parser.js, but this is not what we want.
Thank you all, for this awesome library.

Oh wow this looks awesome! 😍  @Rich-Harris @philpl mind giving this a good look?
Also /cc @TheLarkinn, maybe he has clues which entry point we'd use in package.json for this.

This looks really great! Thanks a bunch!
I'd imagine that for the ES imports entrypoint, we'd have to create a second no-parser.mjs, but that probably doesn't work yet

@YasserKaddour awesome work! I'd like to change a couple of things keep the config clean. I can do it myself as well, if you're busy. :+1: :tada:

Thank for the feedback :+1: , I didn't know about .mjs I will look into it.

LGTM. I'm not sure I understand the question about the entry point?

@Rich-Harris Right now with webpack my app bundles with /lib/no-parser/index.js as specified in /no-parser.js, not with ES module in /dist/no-parser.es.js.
Whereas, with the main entry point "main": "lib/index.js", webpack is able to find the equivalent ES module because "module": "dist/styled-components.es.js" is specified in package.json
I am sure I am doing something wrong, I would appreciate your help, Thanks.

@YasserKaddour I took the freedom to adjust the script names for the dist tasks, but apart from that it's ready to go.
But and this is something I've thought about for the last days, what if a library, that builds on styled-components, decides to use the preprocessing? Or what if a library doesn't use it, but a project uses it and includes said library?
If this happens, then we're dead in the water, in the bundling sense, since a project's bundle will then include both of our bundles: no-parser and main.
This is already a problem, and this PR won't change anything i.e. make it worse nor better, but it's something that I think is worth addressing here.
cc/ @mxstbr @geelen

@YasserKaddour you're not doing anything wrong, this is basically an unsolved problem at the moment. Node's proposed solution is to use .mjs files alongside .js files, while an alternative proposal suggests using a modules.root key in package.json.
Until one of those solutions wins, the best you can do is document it well.

That is indeed an issue @philpl, I hadn't thought of that. God dammit.
What do we do in that case?

@Rich-Harris Thank you, I hope they will decide on this soon.
In the meanwhile I come up with a little hacky solution by adding a module flag on the babel plugin that changes require('styled-components/no-parser') to require('styled-components/dist/no-parser.es')
This doesn't solve @philpl problem, but work fine if you don't use plugins. WDYT?

@philpl These import could be made into a separate bundle / repo like styled-component-core:
/* Import singletons */
import generateAlphabeticName from '../utils/generateAlphabeticName'
import styleSheet from '../models/StyleSheet'

/* Import singleton constructors */
import _StyledComponent from '../models/StyledComponent'
import _ComponentStyle from '../models/ComponentStyle'
import _GlobalStyle from '../models/GlobalStyle'
import _styled from '../constructors/styled'
import _keyframes from '../constructors/keyframes'
import _injectGlobal from '../constructors/injectGlobal'
import _constructWithOptions from '../constructors/constructWithOptions'

/* Import components */
import ThemeProvider from '../models/ThemeProvider'

/* Import Higher Order Components */
import withTheme from '../hoc/withTheme'

Maybe when you will switch to Lerna. It wouldn't fix the problem entirely but it would avoid import duplication.

As @geelen had an alternative proposal for addressing this first, I'm going to carefully close this for now :) We can reopen it, if we consider it again, but this might be more of the v3 territory, where we'll integrate preprocessing and static css stuff into the core lib, which will make the split obsolete. This is experimental after all, and I don't think we have to reach some kind of interoperability for now


Emmet expand abbreviation is bound to tab but it doesn't work

VSCode Version: Code - Insiders 1.13.0-insider (c2a17a7929259d3d2643cb3f98478e994a39605b, 2017-05-30T05:12:15.312Z)
OS Version: Linux x64 4.10.0-21-generic
Extensions:

Extension
Author
Version

EditorConfig
EditorConfig
0.9.3

lorem-ipsum
Tyriar
1.0.0

sort-lines
Tyriar
1.3.0

theme-sapphire
Tyriar
0.2.1

vscode-svgviewer
cssho
1.4.1

tslint
eg2
0.15.0

git-project-manager
felipecaputo
1.3.2

md-navigate
jrieken
0.0.1

vscode-scss
mrmlnc
0.6.2

seti-icons
qinjia
0.1.3

#27316
The command palette says tab:

But pressing tab in this state does nothing:

keybindings.json entry:
{ "key": "tab",                   "command": "editor.emmet.action.expandAbbreviation",
                                     "when": "config.emmet.triggerExpansionOnTab && editorTextFocus && !config.emmet.useModules && !editorHasMultipleSelections && !editorHasSelection && !editorReadonly && !editorTabMovesFocus" },

Maybe it's an issue with the keybindings system? Why is it saying tab in the command palette when the context is wrong (emmet.useModules is true)

Yes, looks like an issue with the keybindings system.
In stable, set emmet.triggerExpansionOnTab to false and you will still see Tab next to the same command

@alexandrudima FYI

@ramya-rao-a Sorry I didn't understand what is the issue with the keybindings system ?

@alexandrudima
The Emmet: Expand Abbreviation command is bound to the tab key on the following conditions: https://github.com/Microsoft/vscode/blob/master/src/vs/workbench/parts/emmet/electron-browser/actions/expandAbbreviation.ts#L30
According to this tab will not be bound to the command when emmet.triggerExpansionOnTab is set to false (among other conditions)
Now, when you bring up this command in the command palette, tab is shown as the keybinding for the command regardless of the value of the setting emmet.triggerExpansionOnTab (or the result of the other conditions)
This is the issue that @Tyriar brought up.
Now I get that it might be an overhead to calculate the when clause of a command to decide whether or not to show the keybinding in the cmd palette. If so, then we can close this issue as "by design".
This issue applies to all commands that are bound to a keybinding with a when clause which has config settings

@alexandrudima ping

My personal take is we should not render key shortcut in this case but still show this command in the list.
But I found another interesting behavior. Let's say we are working on a TypeScript file and Emmet should not work in this case. However you can still run Emmet Expand from command palette and it will insert a Tab. My expected result is this command does nothing in this case. (I may be talking about the same thing as https://github.com/Microsoft/vscode/issues/18517 . )

Thanks, I understand now your point. The problem is that evaluating when expressions in the context of the Command Palette would remove more than ~50% of the keybindings.
e.g.
{
	"key": "alt+cmd+up",
	"command": "editor.action.insertCursorAbove",
	"when": "editorTextFocus"
}

The command editor.action.insertCursorAbove is bound to alt+cmd+up only when the editor text has focus. When opening the Command Palette, that context is lost, e.g. the focus moves to the Command Palette input box, where editorTextFocus does not hold true. The same is true of very many other when expressions, which hold true under special circumstances. e.g.:
{
	"key": "f12",
	"command": "editor.action.goToDeclaration",
	"when": "editorHasDefinitionProvider && editorTextFocus && !isInEmbeddedEditor"
}

Consider having opened two files, one Plain Text, and one which is a TypeScript file, the TypeScript file defines editorHasDefinitionProvider, while the Plain Text one does not. What should the Command Palette do in this case, i.e. which context should it choose to evaluate the commands in. Would it be expected that launching the Command Palette from different contexts present different keybindings. i.e. launching the Command Palette from the terminal or the debug console, etc.
The current presented keybindings are those that are proven to be reachable. Consider the following: e.g.:
{
	"key": "f12",
	"command": "command1",
	"when": "editorTextFocus && !isInEmbeddedEditor"
},
{
	"key": "f12",
	"command": "command2",
	"when": "editorTextFocus"
}

Only in such cases, where we can statically prove that a keybinding rule is shadowed by another rule, we don't show the keybinding. i.e. in this case, the binding for command2 is obviously always going to trap the f12 key and there is no possible context under which this does not happen. So we will show no keybinding for command1.
But in other cases e.g.:
{
	"key": "f12",
	"command": "command1",
	"when": "editorTextFocus"
},
{
	"key": "f12",
	"command": "command2",
	"when": "editorTextFocus && b"
}

In such cases it is not possible to statically prove that there exists no context where f12 does not bind to command1 (i.e. when !b, the first when holds true). In such cases, we present f12 to both commands in the Command Palette.
I am open for ideas to how to improve this.

@alexandrudima No bright ideas from me here :(
Closing this issue for now.
The concern specifically around Emmet command and tab will be taken care of once we move to new emmet model and tab will no longer be associated with emmet


One search context

The works,  person, and grants search should be combined into a single default search. This requires

[x] Collating all the searches so the proper fields are searched
[x] Updating the client for a default searh only
[x] Updating the client admin page.

@Vensberg, default searches should look good for all types, and the order should be constant when switching to people, works, and grants.

@Vensberg  eg. https://dev.experts.library.ucdavis.edu/search?s=engineering

Looks good.


plugin does not pass options as locals, but Pug itself does

Hello.
I got pretty simple config I'm using for pug templates:
{
	pretty: false,
	dev: false, // true or false
	basedir: 'path/here',
}

Pug pass dev property to all templates as local (and other two options as well). I expect rollup-plugin-pug to mimic this behavior when passing options to it. This isn't working as I expected, so if I would depend on dev in my templates I will got different rendering of template when using it directly via Pug renderer or via rollup plugin.

Hi @StreetStrider , when you say "Pug" do you mean the command line? or some method of the API.
The locals was used by compatibility with an old Jade plugin.
I can see problems passing the same value through locals:
{
	pretty: false,
	locals: { dev: false }, // true or false
	basedir: 'path/here',
}

This plugin does "static compilation" using the pug compile method and evaluating it immediately with the locals property of the options passed to the plugin.
I don't know if its a good idea mixing compiler options with the template's context values, anyway I'm releasing a new version for you with an undocumented _pug_options property in the scope, I can't change this behavior in current (minor) versions.
Closing this issue now.

Ugh, I think I did a mistake here. I'm using Pug programmatical API to statically compile templates. I was obscured by Pug documentation for render which says that «An options object, also used as the locals object.». So I believe that pug.compile share this behavior: i.e.
pug.render(template, options_and_locals) is equivalent to pug.compile(template, options)(locals) where actual locals = Object.assign({}, options, locals) for each invocation.
But this example proves that I was wrong and no actual «inheritance of locals» happens:
var pug = require('pug')

var template =
`
div #{pretty}
div #{basedir}
div #{x}
div #{y}
div #{dev}
`

var options =
{
	pretty: true,
	basedir: '/tmp',
	x: 'x',
	y: 'y',
	dev: true
}

var r1 = pug.render(template, options)

console.log(r1)

var compiled = pug.compile(template, options)

var r2 = compiled({ y: 'y2' })

// here all except `y` would be empty
console.log(r2)

Looks like I should use .static feature of rollup-plugin-pug and if it uses pug.render under the hood, everything would work for me. Unless I should also use locals option.

@aMarCruz, hello. I'm sorry to bother you, but I think that when I use .static templates with this plugin, it should pass options as locals. I think so, because it is the behavior of Pug itself when you render string directly.
There's obvious symmetry:

pug.compile ~ import template.pug
pug.render ~ import template.static.pug

However in (2) import does not works like pug.render. This might be because under the hood it is still a call to pug.compile, followed by immediate template() call (? I guess). I believe importing static template must mimic pug.render. Is this doable? _pug_options can be eliminated then. Thank you for any effort.

@StreetStrider  this is:
import template.pug equivalent:
  const converterFunction = pug.compile( template.static.pug, pug.options );
  const htmlString = converterFunction( locals );
  export default JSON.stringify( htmlString );

import template.static.pug :
  const jsCode = pug.compileClientWithDependenciesTracked( template.pug, pug.options );
  // jsCode will be prefixed with the tracked dependencies and "export default"
  // ...to generate an ES6 JavaScript module

(where pug.options is a subset of options passed to rollup-plugin-pug).
Hope this help.

@aMarCruz in case of static template why using compileClientWithDependenciesTracked? It's needed only if you need to track dependencies. When static template is processed, it is instantly rendered to string. Why need to track dependencies for a generated string? Isn't it self-sufficient?

Why're you using custom assign? If you're targeting modern environments, I believe, you're free to use Object.assign instead.

@StreetStrider , the imports in my example were reversed, sorry! corrected now.
Custom assign is congruent with the transpiled code in dist/ (Object.assign is not ES5) ... and an old habit of mine.

@aMarCruz

corrected now.

If you commit anything, please, can you push this to repo? I would like to see it. I'm planning to try to apply my idea with render and check if this would break any tests. I'm planning to eliminate previously introduced _pug_options as well.

@StreetStrider only my comment was wrong, the code is corrent.
It is in 89-110 of index.js


Multi-env doesn't change

Multi-env doesn't change. I always get variables from .env.development, most likely because this file is the first in the folder. I have the folder with 3 files: .env.development .env.staging .env.production. I've tried cleaning, reinstalling, and many more options, but nothing seems to work.
My npm scripts:
"start:development": "NODE_ENV=development npx react-native start --reset-cache",
"start:staging": "NODE_ENV=staging npx react-native start --reset-cache",
"start:production": "NODE_ENV=production npx react-native start --reset-cache",

I also use the next script:
"babel-clear": "rimraf node_modules/.cache/babel-loader/*,"
My babel config:
module.exports = {
  presets: ['module:metro-react-native-babel-preset'],
  plugins: [
    [
      'module:react-native-dotenv',
      {
        moduleName: '@env',
        path: './config/.env',
        blocklist: null,
        allowlist: null,
        safe: false,
        allowUndefined: true,
      },
    ],
  ],
};

In my file index.js
import { URL } from '@env';
"react": "17.0.1",
"react-native": "0.64.1",
"react-native-dotenv": "^3.0.0",

How are you setting which environment you're using for your server? Are you using node_env? App_env? Setting it in your configs? Let's figure this out.

Updated. Please see in my question

I understand correctly that NODE_ENV indicates which file to use?

Try applying the environment setting to your run script instead and let me know what happens

Could you give me an example?

Sorry for the delay. I'm just doing a bit of research into the problem

Did you manage to reproduce it?

Working on it here https://github.com/goatandsheep/react-native-dotenv-metro-demo

Also tell me please, can I get a variable NODE_ENV from other places? For example from gitlab CI?

so I did find a bug actually. On gitlab CI my recommendation would be to do the same thing, which is run NODE_ENV=test staging isn't recommended but might work.

will be fixed in v3.1.1

@KonstantinZhukovskij if this change helps you, I request if you can make a donation, please do

@goatandsheep  I updated and it still doesn't work. Where exactly are you specifying NODE_ENV?

I updated and it works great. Thank you very much for your work.

@goatandsheep  I asked yesterday about whether I can set the NODE_ENV constant from other places, for example, from gitlab CI? Now I tried to build a test assembly and got a production environment everywhere. Could this be a library problem? What are the ways to create a constant NODE_ENV?

That's bizarre! In test, you should get test. I don't think I know what you mean by set node_env everywhere. Can you please expand on that?

This is part of my code inside the gitlab CI. I am trying to understand whether it is possible to indicate the environment in this way?
firebase (stage):
  extends: .app-deploy
  stage: staging
  environment:
    name: stage
  variables:
    BUILD_DESTINATION: 'firebase'
    APP_IDENTIFIER: 'myID'
    NODE_ENV: 'stage'

So the module should support reading the global NODE_ENV. However, I haven't tested it in this way yet. Also, for adding process.env variables into the mix, that is also in a pending PR. Go take a look if you're interested #191
If you want "staging", don't use "stage". Also, if you're not using test, development, or production, you're in experimental territory that I do not advise on a tight timeline.

If you want "staging", don't use "stage".

What do you mean?

Sorry about that message that was sent from my phone. Let me expand:
Disclaimer: I haven't used firebase config, I just saw:
  environment:
    name: stage

so I assumed that it would use .env.stage? My apologies if I'm wrong.
I also don't know if this works, but I haven't tried:
  variables:
    NODE_ENV: 'staging'

I recommend you set verbose: true (new option!) to see what value of env is being loaded.
And regarding
  variables:
    BUILD_DESTINATION: 'firebase'
    APP_IDENTIFIER: 'myID'

These will only load if #191 is merged

@goatandsheep  Are you going to merge it?

I'm waiting to see if I can get some support before I do as it's a major feature

@goatandsheep Could you create a new branch with the latest changes and #191 ?

@goatandsheep I made a patch with your changes #191 and tested it, but it still doesn't work. I am not getting data from my environment files, although I did get the NODE_ENV constant.


ObjectPageLayout dynamic sections using addSection throws _getClosestScrolledSectionId

OpenUI5 version: 1.56.x (latest SCP version).
URL (minimal example if possible): comming soon:
https://objectpage-i7sv387efh.dispatcher.hana.ondemand.com/index.html
After
oObjectPageLayout.destroySections();
and dynamically adding new sections via fragment
oObjectPageLayout.addSection(oSection);
the autoscroll feature throws errors.
Steps to reproduce the problem:
Use selector to switch between content fragments
What is the expected result?
avoiding the error
What happens instead?
Uncaught TypeError: Cannot read property 'getId' of undefined
at f. (ObjectPageLayout-dbg.js:2657)
at Function.each (jquery-dbg.js:371)
at f.i._getClosestScrolledSectionId (ObjectPageLayout-dbg.js:2640)
at f.i._storeScrollLocation (ObjectPageLayout-dbg.js:3260)
at f.i.onBeforeRendering (ObjectPageLayout-dbg.js:538)
at f.a._handleEvent (Element-dbg.js:231)
at v (RenderManager-dbg.js:272)
at R.renderControl (RenderManager-dbg.js:424)
at R.render (RenderManager-dbg.js:673)
at Function.U.rerenderControl (UIArea-dbg.js:684)
Regards Holger

Hello @hschaefer123
The issue is approved.
Actually, this is known issue, that we fixed in 1.58.
I created internal incident to initiate downport of the fix in 1.56.
Best,
ilhan

You should have your problem fixed in 1.56.8 version, which will be shipped in the next couple of days.

Sounds Great!
Thank you ;-)


[FLINK-14630] Re-enable logging for Yarn tests

What is the purpose of the change
With FLINK-14502 we changed how log property files are being discovered by the YarnClusterDescriptor and this resulted in Yarn tests not writing their job manager log files anymore. This made debugging a lot harder and next to impossible.
This commit fixes this by introducing and exposing the utility method Configuration setLogConfigFileInConfig(...) in the FlinkYarnSessionCli which is responsible for discovering the log config file. This method is now used directly by the tests to simulate what the CLI does based on user-provided input.
Verifying this change
Running a test like the YarnITCase and seeing the log files being created in the target dir is sufficient to verify the validity of the change.
Does this pull request potentially affect one of the following parts:

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

Documentation

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

Merged.


Documentation provider error url instead host

In the documentation https://registry.terraform.io/providers/marshallford/pfsense/latest/docs#schema  ,
The argument host  seems to not working,  but  url  instead :)

Closed with #13


WindowsError: [Error 5] Access is denied -- manual.py

Keep getting the same error, I've tried giving lots of things access including running the powershell as admin. any help would be greatly appreciated. I've attached a png of the powershell window

Have you installed all the pre-requirements for python first?

VC for Python 2.7 (Windows Users Only) - Download and install - http://www.microsoft.com/en-us/download/details.aspx?id=44266
setup_tools - https://pypi.python.org/pypi/setuptools#installation-instructions
requests - Run pip install requests
requests security package - Run pip install requests[security]
requests-cache - Run pip install requests-cache
babelfish - Run pip install babelfish
guessit - Run pip install guessit<2 to use manual.py (requires guessit version 1, version 2 is a complete rewrite, still in alpha, and not backwards compatible)
subliminal- Run pip install subliminal to enable automatically downloading subtitles
stevedore - Run pip install stevedore (this will be automatically installed with subliminal)
dateutil - Run pip install python-dateutil (this will be automatically installed with subliminal)
deluge-client Run pip install deluge-client if you plan on using Deluge
qtfaststart Run pip install qtfaststart to enable moving moov atom

Also you should be able to just run manual just by clicking the .py from your install folder.

Hi, Thank you for the response. Yes I have already install the pre requirements. But just incase I ran the commands to add them again they all returned "already satisfied"

The problem was I didn't have the full path to ffmpeg.exe and ffmprobe.exe I have corrected this in the autoProcess.ini file and now manual.py works as expected


disable_progress_bar_animation not working

Hi,
I want to use Gooey for a long-running application, namely a TCP server, which the user initially configures and then runs, and can stop whenever they want. In that context a progress bar and the stop message about potential loss of data doesn't make sense. But I try to disable the progress bar but it still exists. Simple example below.
Expected Behaviour: No progress bar
Actual Behaviour: Progress bar visible

[x] OS Windows 10
[x] Python Version 3.8.10
[x] Gooey Version <IP_ADDRESS>
[x] Thorough description of problem

[x] Expected Behavior
[x] Actual Behavior

[x] A minimal code example -- preferably copy/pastable in the issue itself (less time figuring out how to run your code == more time debugging!)
[x] Screenshot (if visual quirk)
[x] Anything else you may think will be helpful

Code example:
import argparse
import socketserver
from gooey import Gooey

class EchoHandler(socketserver.BaseRequestHandler):

    def handle(self):
        data = self.request.recv(1024).strip()
        print("{} wrote:".format(self.client_address[0]))
        print(data)
        self.request.sendall(data.upper())

def run_server(host, port):
    print('Starting server on %s:%d' % (host, port))
    with socketserver.TCPServer((host, port), EchoHandler) as server:
        server.serve_forever()

@Gooey(show_stop_warning=False, hide_progress_msg=True,  disable_progress_bar_animation=True)
def main():
    parser = argparse.ArgumentParser()
    parser.add_argument('-H', '--host', type=str, default='<IP_ADDRESS>')
    parser.add_argument('-P', '--port', type=int, default=4000)
    args = parser.parse_args()
    run_server(args.host, args.port)

if __name__ == "__main__":
    main()

Howdy,
Also, just to clarify a bit, what hide_progress_msg does is filter out the text which appears in the console. It's only useful when paired with one of the progress regex args.
That said, it does totally look like disable_progress_bar_animation is in fact busted. I've updated the title of your issue. Will go into 1.0.9 shortly.

Fixed on the release branch