how to login cli 2.0 using service-principal and certificate

Hi,
cli1.0 had an option to use just this:
azure login --service-principal --tenant ZZZZZZZZZZZZ -u RRRRRRRR --certificate-file MYCERT.pem --thumbprint ZZZZZZZZZZZZZZZZZ
there doesn't seem to be a CLI2.0 equivalent of this useful feature!!
Thanks!

az login -h has an entry for this scenario:
Log in with a service principal using client certificate.
        az login --service-principal -u http://azure-cli-2016-08-05-14-31-15 -p ~/mycertfile.pem
        --tenant contoso.onmicrosoft.com

If that doesn't work, please re-open.

JFYI, the az ad sp create-for-rabc supports to create a service principal with certificate through the flag of  --create-cert

yes I saw that in the documentation but it doesn't work - the same service principal and cert that I can use for Azure 1.0 CLI doesn't work for Azure 2.0 CLI:
/usr/local/bin/azure-cli/az login -u https://MYURL --tenant XXXXXXXXX -p ./MYCERT.pem --service-principal
Get Token request returned http error: 401 and server response: {"error":"invalid_client","error_description":"AADSTS70002: Error validating credentials. AADSTS50012: Invalid client secret is provided.\r\nTrace ID: XXXXXXXXXXXXXX\r\nCorrelation ID: CCCCCCCCCCC\r\nTimestamp: 2017-04-03 00:15:01Z","error_codes":[70002,50012],"timestamp":"2017-04-03 00:15:01Z","trace_id":"TTTTTTT","correlation_id":"CCCCCCCCC"}

Please make sure ./MYCERT.pem is the right file path to the pem file

its the same cert i used for CLI 1.0 - which works perfectly:
azure login --service-principal --tenant TTTTTTTTT -u UUUUUUUUUUUUU --certificate-file MYCERT.pem --thumbprint TTTTTTTTTTTTTTTTTTTTTTTT
info:    Executing command login
info:    login command OK
azure vm list etc.. works
so to restate, on the same machine, using same certificate and  tenantID I can login with Cert on CLI 1.0 just fine.

running with debug it seems  the CLI is parsing the password as a text field and not a file:
func=<function _execute_command at 0x41f7b90>, password='./MYCERT.pem', service_principal=Tru
I 'straced' the function calls and I don't see any open attempt on the certificate file.
seems i am missing commit #2327  which was merged 18 days ago
sigh................

i meant #2457

The support is not released yet and we will have on this week. For now you can either use the docker image or the nightly drop

@dhermans, we have published a release with the support. Thanks.

@yugangw-msft Thanks very much! working!!


Fix site so it works with newer versions

Post of shame and comment from dev:
https://discourse.gohugo.io/t/site-built-with-previous-version-wont-build-properly/10420/5
And no, introduced breakage was not documented in 0.32 release notes:
https://gohugo.io/news/0.32-relnotes/
@meiqimichelle mind doing some testing?
We also need to check that jenkins is generating the right result. Probably it's using an older version.

https://ci.ipfs.team/blue/organizations/jenkins/IPFS%2Fipfs-cluster-website/detail/fix%2Fnew-hugo/1/pipeline

https://ci.ipfs.team/blue/organizations/jenkins/IPFS%2Fipfs-cluster-website/detail/PR-30/1/pipeline

Hmm, I've been trying to track down the error and it seems like that error / WARN always shows up -- even on master using Hugo v0.31 to render the pages correctly! Boo.

Wow, I think they changed this again under my feet because it worked and today I checked (after upgrading hugo again) and again broken!. I have changed the doc layout and things seem fine for me again. Can you try again to double-check?

fixed on #41


Handle bare proxy objects when analysing the size of the memory

We should handle. bare proxy objects that subclass directly from ProtoObject when analysing the size of the memory

https://github.com/feenkcom/gtoolkit-utility/commit/6d3b8424dc3194764e12202073dcd46536d529c2


Nofollow

Fixes nofollow behaviour

Do not add nofollow to internal links
The attribute is rel not ref

@laurens Thanks for finding that, it has now been merged to 3-0-stable and master branch.


Import and map postman exported data

I encountered, that I can export a collection with different requests from postman and it would be cool, if we can import it and use the same data from postman. Here is a demo file:
{
	"info": {
		"_postman_id": "120d6e73-976e-44e9-9ebf-264f5d16ce96",
		"name": "Test",
		"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
	},
	"item": [
		{
			"name": "New Request",
			"request": {
				"method": "GET",
				"header": [],
				"url": {
					"raw": "puls-webagentur.de",
					"host": [
						"puls-webagentur",
						"de"
					]
				}
			},
			"response": []
		}
	]
}

I would just say, take postman and play around. When I google for that I couldn't find that much except the json org scheme: https://schema.postman.com/collection/json/v2.0.0/draft-04/collection.json

I couldn't find much info either.
Thanks. I will take a look at it.

Sorry. I had forgotten about it.
I have just pushed an initial version. The import/export buttons can be found in the miscellaneous section;
Tools → Options → Miscellaneous → REST Client
Only request method and URL can be imported/exported for now.
Commit db422d2

Headers can be now imported/exported.
Commit 1211ada

Closing this issue as it is now completed.

Awesome :)


Spring Cloud Stream filtered with IntegrationFlow waits indefinitely for a response when selector is false

I'm having trouble using IntegrationFlow along with Spring Cloud Stream to perform some complex filtering on messages.
Suppose my service is only interested in messages with an eventType header of foo:
@Configuration
public class FooListener {

    @Bean
    public IntegrationFlow fooFlow() {
        return IntegrationFlows.from(FooMessageFunction.class, gateway -> gateway.beanName("foo"))
                .filter(Message.class, message -> {
                    Object value = message.getHeaders().get("eventType");
                    if (value == null) {
                        return false;
                    } else {
                        value = value instanceof byte[] ? new String((byte[]) value) : value.toString();
                        return value.equals("foo");
                    }
                })
                .transform(Foo.class, this::handleFoo)
                .get();
    }

    protected Message<FooEvent> handleFoo(Foo foo) {
        // TODO: handle foo

        FooEvent event = new FooEvent(...);

        return MessageBuilder.withPayload(event)
                .setHeader("eventType", "fooEvent")
                .build();
    }

    interface FooMessageFunction extends Function<Message<?>, Message<FooEvent>> {}
}

spring:
  cloud:
    function:
      definition: foo
    stream:
      kafka:
        binder:
          brokers: ${KAFKA_HOST}:${KAFKA_PORT}
      bindings:
        foo-in-0:
          binder: kafka
          destination: test
          content-type: application/json
        foo-out-0:
          binder: kafka
          destination: test
          content-type: application/json

This will work as expected so long as the filter returns true. When the filter is false, it seems the stream still expects some kind of response which never comes. This causes the application to hang on GenericMessagingTemplate line 240.
To Reproduce
Steps to reproduce the behavior:

Clone https://github.com/jdmcmahan/scst-filter-test.git
Spin up a Kafka instance
Run scst-filter-test project
Verify "foo" message is working

kafkacat -P -b  -t test -p 0 -H eventType=foo

Try "bar" message

kafkacat -P -b  -t test -p 0 -H eventType=bar

Try "foo" message again (this will not be received)

kafkacat -P -b  -t test -p 0 -H eventType=foo

Version of the framework
3.0.4.RELEASE (as defined by Hoxton.SR4)
Expected behavior
Application should gracefully handle uninteresting messages and continue to function

For the "non-waiting" scenario consider to change a gateway replyTimeout:
IntegrationFlows.from(FooMessageFunction.class, gateway -> gateway.beanName("foo").replyTimeout(0))

See its JavaDocs:
/**
	 * Allows to specify how long this gateway will wait for the reply {@code Message}
	 * before returning. By default it will wait indefinitely. {@code null} is returned if
	 * the gateway times out. Value is specified in milliseconds.
	 * @param replyTimeout the timeout for replies in milliseconds.
	 * @return current {@link GatewayProxySpec}.
	 * @see GatewayProxyFactoryBean#setDefaultReplyTimeout
	 */
	public GatewayProxySpec replyTimeout(long replyTimeout) {

More info is in Spring Integration: https://docs.spring.io/spring-integration/docs/current/reference/html/messaging-endpoints.html#gateway-timeouts

Hi @artembilan,
Thanks for the response!
Unfortunately, this doesn't seem to have an effect. The value I specify in .replyTimeout() isn't getting propagated to the GenericMessagingTemplate instance. According to the debugger, the internal value is always -9223372036854775808.

Oops! It's really doesn't apply.
But in Spring Integration: https://github.com/spring-projects/spring-integration/issues/3266
As a workaround consider to use a @MessagingGateway on your FooMessageFunction instead.
This way you would need to change your IntegrationFlow to start from a defaultReqeustChannel of that @MessagingGateway definition.
@olegz , @sobychacko ,
I think we can close this issue here since there is nothing to do in SCSt to fix the problem.
It is fully up to Spring Integration.
Thanks

Thanks @artembilan! I'll keep an eye on the SI issue.


Using NLog in Xamarin.Forms (Portable) project

Type: Question
NLog version: 4.4.0-beta5 / 4.3.3
Platform: Xamarin PCL (.Net 4.5)
I tried to install the latest alpha release in my PCL project (Xamarin.iOS, Xamarin.Droid, UWP) with this command:
Install-Package NLog -Pre
Thereby I'm using Visual Studio 2015. The installation fails with this error

Install-Package : Could not install package 'System.Diagnostics.Contracts 4.0.1-beta-23516'. You are trying to install this package into a project that targets
'MonoAndroid,Version=v6.0', but the package does not contain any assembly references or content files that are compatible with that framework. For more
information, contact the package author.
At line:1 char:1

Install-Package NLog -Pre

  + CategoryInfo          : NotSpecified: (:) [Install-Package], Exception
  + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand

If I try to install NLog 4.3.3 I get this error:

Error		Could not install package 'NLog 4.3.3'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile111', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.			0

Is it possible to integrate NLog in my project and if yes, how?
Another question: Will support for UWP be included in NLog 4.4?
Thanks!
Edit:
What I've found out is that I can only install NLog directly in the Xamarin.iOS and Xamarin.Droid sub-projects.
Additional question: Where do you instantiate the logger? In a global singleton?

We have the same issue with UWP. There are packages, but some are empty which is really unclear how to fix (and which packages).

Additional question: Where do you instantiate the logger? In a global singleton?

https://github.com/NLog/NLog/blob/master/src/NLog/LogFactory.cs

My solution has been to make interfaces in my PCL that duplicate ILogger and LogManager, then to create a shared project (not a PCL) with implementations of those.  See this gist for the code.
For instantiation, the Application object for my Xamarin.Forms app has a static property holding the ILogManager, and the first thing the platform specific Main function does is initialize NLog (at least on iOS, initialization must be done in code to get the correct path if you're using the documents folder) then set Application.LogManager.  To create loggers for each class I use a slight variation on the normal pattern.  The lazy initialization may not be strictly necessary, I just wanted to be sure no loggers got created before Application.LogManager had been set.
public class MyClass
{
  // Note this is my ILogger, not NLog.ILogger
  private static readonly Lazy<ILogger> __log =
    new Lazy<ILogger>(() => Application.LogManager.GetLogger<MyClass>());
  private static ILogger Log { get { return __log.Value; } }
}

What I'd really like to see, is the interface components of NLog (ILogger, LogLevel, an interface for LogFactory, etc) split out into a separate library.  For most people it wouldn't affect anything - adding NLog would just automatically pull in the NLog.Interfaces dependency (or whatever it's called).  However, people who want to log in PCLs can add only the Interfaces, and all they have to worry about is injecting the correct LogFactory from platform specific code.  @304NotModified do you have any objections to that or thoughts about implementing it?

What I'd really like to see, is the interface components of NLog (ILogger, LogLevel, an interface for LogFactory, etc) split out into a separate library.

So a package called like NLog.Abstractions?
I think it's a breaking change. We can do it for NLog 5, but I think it's too soon to NLog 5 (and a lot has to be done before it)

@304NotModified yes, that exactly.

I just tried the latest NLog nuget v4.4.0-beta11 on a new Xamarin.Forms project, that had its XF updated to v2.2.
it did not succeed:
Could not install package 'NLog 4.4.0-beta11'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile111', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
so no references were added to any of the default project ".Driod, .iOS, UWP, Windows 8.1".

Don't get it.  Netstandard1.3 should be UWP/Mono compatible :(
https://github.com/dotnet/corefx/blob/master/Documentation/architecture/net-platform-standard.md

Can you try without windows 8.1?

Ow yes, that's also the problem in the TS.  Xamarin.Ios/android  works, but isn't portable.
Not sure if a portable for xamarin ios+android +uwp solves it.

closing this, feature request is at #155


Follow up on Slack webhook integration update.

This is a follow-up on PR #30465. There are a number of improvements that I think can be worked on to further upgrade our Slack integration as well as the Slack import tool once #30465 is merged.
High priority:

[x] Improve token checking to do fewer callbacks: https://github.com/zulip/zulip/pull/30465#discussion_r1880969823.
[ ] Port the topic formatting feature to use config_options to simplify the instructions.

Medium priority:

[x] Remove Duplicative Code. To convert Slack text to Zulip markdown, a function in slack_message_conversion.py called convert_to_zulip_markdown is copied and adapted to be used in the Slack integration (under the same function name). We couldn't use it directly because of the difference in data being handled. We could probably break up the real convert_to_zulip_markdown and reuse it at Slack integration to minimize duplicative code.
[ ] Document the API token scope requirements, on why we need each one.
[ ] Improve Slack Message Conversion. commit 10d188e2d2b15078066d77922376efae208016a7 documents 4 types of payload the Slack integration can't yet convert properly. This is also relevant for our Slack import tool because the two use the same process and functions to convert Slack messages.

Other items not yet prioritized:

[ ]  Improve Latency Problem. The Slack integration expects high-volume traffic because we're sending live messages from Slack to Zulip. Doing two callbacks(username & channel) for each message could potentially be problematic for latency especially if this integration is used as part of the Slack Bridge, which is trying to replicate a real-time mirror to Slack. Finding a way to properly cache these callbacks might ease the potential latency problem. Also, we're probably doing one callback per mention, not a single one per message, which is in some ways good (don't want to do the callback if there are no mentions), but bad if there are several.
[ ] Improve Channel Mention Conversion. Both Slack user mentions and channel mentions don't convert to real Zulip mentions, and only to mention-like text. However, improving how we convert channel mentions might be doable, as we already provide users with a way to map their Slack and Zulip channels.
[ ] Improve Setup UX. Investigate Slack app manifest, it could possibly improve UX when setting up the integration by simplifying the Slack app setup steps.
[ ] Consider adding support for more complex channel mappings, possibly via just having a single-channel option and support for generating a specific single-channel mapping. Needs discussion.
[ ] Add support for message_changed event.  Sentry trace from an event we saw which is of subtype message_changed. This might be hard to fix because we don't have Zulip-Slack message ID mapping. CZO

@zulipbot add "area: integrations"

Update on the Slack token scopes. It looks like we do need emoji:read and users:read.email after all -> CZO. So whats stated in the docs are probably the exact scopes that the integration need.

Cool. I recommend doing small pull requests for individual items on this list, especially the higher-priority ones, and only stacking them together as required to avoid merge-conflicts with your own work.

The fix for  Port the topic formatting feature to use config_options to simplify the instructions. is #32797


[WIP] [Enhancement] Remove unused dcheck for RleEncoder

Fixes #3012
if type == boolean, _bit_withd is 1 not 64
    explicit RlePageBuilder(const PageBuilderOptions& options)
            : _options(options),
              _rle_encoder(nullptr),
              _first_value(0),
              _last_value(0) {
        _bit_width = (Type == TYPE_BOOLEAN) ? 1 : SIZE_OF_TYPE * 8;
        _rle_encoder = std::make_unique<RleEncoder<CppType>>(&_buf, _bit_width);
        reset();
    }

What type of PR is this:

[ ] BugFix
[ ] Feature
[x] Enhancement
[ ] Refactor
[ ] UT
[ ] Doc
[ ] Tool

Checklist:

[ ] I have added test cases for my bug fix or my new feature
[ ] This pr will affect users' behaviors
[ ] This pr needs user documentation (for new or modified features or behaviors)

[ ] I have added documentation for my new feature or new function

Bugfix cherry-pick branch check:

[x] I have checked the version labels which the pr will be auto-backported to the target branch

[x] 3.1
[x] 3.0
[x] 2.5
[x] 2.4

[FE PR Coverage Check]
:heart_eyes: pass : 0 / 0 (0%)

[FE PR Coverage Check]
:heart_eyes: pass : 0 / 0 (0%)

@Mergifyio backport branch-3.1

@Mergifyio backport branch-3.0

@Mergifyio backport branch-2.5

@Mergifyio backport branch-2.4


Added a feature that users can adjust CPU timer interval

This feature let user to set delay (default by 3000ms as constant from the original code) to reflect actual CPU Utilization.
!()

@airtaxi Please resolve conflicts.

@airtaxi Please resolve conflicts.

I think it's fixed.
Could you check?
Thanks!

@airtaxi
I will check this PR on the weekend.


User can configure a Credentials Callable.

This is an attempt to fix #1895

I dont love this approach: it's adding yet another layer of indirection. At the end of the day we need a Credentials instance. GoogleCredentials already (de)serializes json and dispatches to both UserCredentials,  ServiceAccountCredentials. On top of that we have CredentialFactory that dispatches to GoogleCredentials from CredentialOptions from various sources. This will add yet another dispatcher to the mix. I would prefer to simplify the current system then add another knob to it

@igorbernstein2: Ack.  Indirection is quite bad in this case.
In #1895, A user requested some way to use the same Credentials object for multiple clients. Right now, the only published option for CBT is the HBase API where the user interface is a Map<String, String>.
There are a few ways to get a Credentials that we discussed on #1895:

We can add a new constructor to our HBase Connection objects, and potentially add wrappers in BigtableConfiguration.
We can use a level of indirection with Strings like we did here.
We can do some other well known Singleton type thing.

Do you have any better ideas about how to implement this in the short term?

I think it might be easier to discuss in person, but I would love to deprecate the CredentialOption indirection step, have BigtableOptions expose Credentials directly, and have the hbase config encode the GoogleCredentials json format.

Closing this PR in favor of #1900


Renderflex overflow on demo image card

I am working on it. Please assign it to me.

please assign me this.


Package Requested

[X] I would like someone else to build the manifest.
[ ] I would like help so I can submit the manifest.
[ ] I have performed a search and couldn't find this package.
[ ] I have checked that the installer for this package is not a standalone or portable executable or a .zip file
[X] I think there is a new version available and I have provided the URL.

Please provide the following information
Publisher: qBittorrent
Publisher Url: https://www.qbittorrent.org
Package Name: qBittorrent
Description:
Package Version: 4.3.9
Installer URL: https://www.qbittorrent.org/download.php
Current Package Identifier (for new versions): qBittorrent.qBittorrent

We cannot add qBittorrent because it is marked as PUA.

https://github.com/microsoft/winget-pkgs/pull/33459
https://github.com/microsoft/winget-pkgs/pull/26231
https://github.com/microsoft/winget-pkgs/pull/23687
https://github.com/microsoft/winget-pkgs/pull/19135


fix(deps): remove del dependency

So, apparently there is already code for rm. Testing to see if there are any deprecation warnings/errors.
The src/lib.fs.js file could be simplified later when Node.js 12.x support is dropped, removing semver and the conditional rm.
Also, if you have similar code in your other packages which cli depends one, it'd be nice to apply the same patch. If not, when Node.js 12.x support is dropped, you will be able to remove the del package from the other packages.
Refs #3941.

🎉 Thanks for submitting a pull request! 🎉
Summary
Fixes #<replace_with_issue_number>

For us to review and ship your PR efficiently, please perform the following steps:

[ ] Open a bug/issue before writing your code 🧑💻. This ensures we can discuss the changes and get feedback from everyone that should be involved.
[x] Read the contribution guidelines 📖. This ensures your code follows our style guide and
passes our tests.
[x] Update or add tests (if any source code was changed or added) 🧪
[x] Update or add documentation (if features were changed or added) 📝
[x] Make sure the status checks below are successful ✅

A picture of a cute animal (not mandatory, but encouraged)

I don't see any deprecation warnings on CI, but I could use more eyes to be safe. :)

Closing for the aforementioned reasons. Just something more to do when Node.js 12.x is dropped :)


Window content not rendered at launch.

Sorry, i can't test the client since the iOS client don't allow yet to scan the qrcode to allow the desktop app.
But i think this may solve the problem:
window.dispatchEvent(new Event('resize'));
Just put this a the onload event.
This is a bit hacky, but this should work :)

I tried but still doesn't work :(

Indeed I think I need a redraw

I fixed it :)

Nice !
How did you do that ? :)

The problem was from the whatapps React interface, the nodewebkit windows couldn't see the modifcation of the DOM so it can't redraw the windows.
I change the the webview to a frame object and call this functions
  //this events are here to repaint the frame :bug from react version used by whatsapp.web
  win.on('closed', function(view) {
    console.log('closed');
  });
  win.on('loaded', function(view) {
    console.log('loaded');
  });
  win.on('  document-end', function(view) {
    console.log('document-end');
  });
  win.on('loading', function(view){
    console.log('loading');
  });
  win.on('document-start', function(view){
    console.log('document-start');
  })

with nothing inside but like that every Dom event nodewebkit repaint the windows.
I found it by chance hahah


Validation trigger on ng-click instead of submit

Hi,
I have two actions in my form "save", "save and approve".
So i want to trigger validation manually in both actions instead of form-submit.
Please do the needful.
Thanks,
Baskar

You can use <button type="button"></button> together with this approach to manually trigger a form submit:
http://stackoverflow.com/questions/16003188/can-i-trigger-a-form-submit-from-a-controller

Thanks for the quick reply.
I tried the solutions mentioned in the stackoverflow link.
But those solutions doesn't trigger fab-form validations.

If you trigger the submit, the validation is triggered, isn't it?

yes. but its not working while invoke submit from controller code as mentioned in stackoverflow answers.

Oh that's interesting! I'll have to check this you
Out. Could you by any chance provide a plunkr?

Sorry. I have been using this plugin part of project and couldn't able to
extract the form code in plunkr
On Oct 12, 2016 10:04 PM, "Johannes Millan"<EMAIL_ADDRESS>wrote:

Oh that's interesting! I'll have to check this you
Out. Could you by any chance provide a plunkr?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/johannesjo/ng-fab-form/issues/91#issuecomment-253266271,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADSTZio2XSdjOkE0tDvMpEfBjqs30AnDks5qzQwogaJpZM4KUZVQ
.

Hey there. I checked again. To trigger the validation messages (at least with the default validations-tempalte) you can set form controllers $triedSubmit property to true. Here is an example:
http://plnkr.co/edit/jIGCxuXGIPkB60ZJP0jS?p=preview

Hi,
Thanks for the plnkr.
Its very closer to my requirement.
The submit doesn't call the respective method if validation fails.
In triedsubmit case we have to handle it as like fake submit - 2.
Please check the modified plunkr.
http://plnkr.co/edit/qlOgr6n6NPtujff8Wzg8?p=preview

Sorry, Im not sure what the issue is. can you elaborate further?
if(!form.$valid) { return;} does not solve your problem?

It solves the problem. but submit button click its handled without this code block.

Sorry, you have to explain a little better what the problem is, you're facing.

sorry, it works as expected.
Please go through this fiddle for reference. [Fake submit 1 click and Fake submit 2 click]
http://plnkr.co/edit/qlOgr6n6NPtujff8Wzg8?p=preview

I'm glad, that it works!


Multiline error messages doesn't work on deno

Precondition:
app.get('/', () => {
   throw new HTTPException(400, `
    I want big messages here,
    so I could print more info about the error
   `);
})

Hono version: v3.2.3
Deno version: 1.34.0
Os: MacOs
Expected result: Response status code 400 with the corresponding text in body
Actual result: Response status code 500 with the Internal Server Error in body
Also, I see an error in the log:
TypeError: Status text is not valid.
    at initializeAResponse (ext:deno_fetch/23_response.js:184:11)
    at new Response (ext:deno_fetch/23_response.js:322:5)
    at HTTPException.getResponse (https://deno.land/x/hono@v3.2.3/http-exception.ts:20:12)
    at Hono.errorHandler (https://deno.land/x/hono@v3.2.3/hono-base.ts:50:16)
    at Hono.handleError (https://deno.land/x/hono@v3.2.3/hono-base.ts:252:19)
    at https://deno.land/x/hono@v3.2.3/hono-base.ts:309:23
    at eventLoopTick (ext:core/01_core.js:182:11)
    at async Server.#respond (https://deno.land/std@0.190.0/http/server.ts:299:18)

That is a workaround:
class BadRequest extends HTTPException {
    constructor(message: string) {
        super(400, {message});
    }

    getResponse(): Response {
        return new Response(this.message, {status: 400})
    }
}

I believe it's not so useful to pass error message both to the body and statusText.

Hi @cah4a
How about this?
app.get('/', () => {
  throw new HTTPException(400, {
    res: new Response(
      `I want big messages here,
    so I could print more info about the error
   `,
      {
        status: 400,
      }
    ),
  })
})

@yusukebe, that will work.
There are 3 reasons why I'd suggest removing L22 completely:

Writing throw new HTTPException(code, message) is more developer friendly.

The reason phrase is an optional part of the HTTP spec and could be stripped by proxies, so the best practice is not relying on it. HTTP/2 just doesn't have it.

Code that works in a dev environment could break in production: you send one-liners from db for testing purposes, a production version has multiline. That behavior even doesn't mention in the documentation.

What do you think?

Hi @cah4a,
After considering what you've said, I've come to the conclusion that you're right. It's okay for us to remove it, and in fact, we should. This change will simplify Hono.
Could you create a PR to resolve this?


pygit: use anonymous remotes

Closes #258
Also drops pypy testing in CI as pygit2 1.13.0 no longer builds wheels for pypy.

Codecov Report
Patch coverage is 100.00% of modified lines.

Files Changed
Coverage

src/scmrepo/git/backend/pygit2/__init__.py
100.00%

:loudspeaker: Thoughts on this report? Let us know!.


USHIFT-1083 microshift admin data backup command

How can we make sure MicroShift is not running before taking the backup? Is that actually a requirement or does cp work ok in that case?

That would be the thing with ps aux I had in previous PR, thanks for the reminder

/retest

/assign @dhellmann @pacevedom

/retest

/test e2e-openshift-conformance-reduced-arm

/label tide/merge-method-squash

I've preformed some early testing on this PR and it behaves as expected.
/unhold


Layout shift when hovering over header in docs

When you hover the mouse over an exported function's header, the "view code" button causes everything below the header to shift down several pixels. When scrolling through and exploring docs, this shift can cause you to lose your place on the page and get confused.
https://github.com/user-attachments/assets/9d649100-f5ec-4260-91bc-30aee81c2b82
Specifically, it appears the button goes from 26px tall to 28px tall because the ::before containing the "View Code" text is 16px tall, while the svg is 14px tall.
To fix, couple of options:

Remove line-height: 1rem from body .ddoc { & .symbolGroup article > div:hover > div + a.context_button::before
Change line-height: 1rem to line-height: 0.75rem (to match the font size)

https://github.com/user-attachments/assets/ee2430e7-58a1-4887-9a40-2f77e83e6ac4
Both seem to work fine for mobile and desktop, but I'll open a PR implementing option 2 to align the line-height and font-size, common for centering text vertically.

Ahh, tailwind. Hmm, that makes this a little more annoying.
https://github.com/jsr-io/jsr/blob/4ac8c12d1cd0e4f0456ccb09d444f2d8338e9fd1/frontend/static/styles.css#L478


SSI Flow - Middle Layer/Wrapper of DIM functions

Summary
! TICKET UPDATE ONGOING!!!!

develop a wrapper (must be release configurable) which wrappes wallet specific functions

...details to be added...currently under validation
Pre-Requ.
the wrapper needs a config file including the

DIM hostname
DIM Auth token url
directoryAdmin Email address (note we need a different admin address in the release file compared to the test file) -> for the test file configure functional lead developer and PO
globalAccount displayName (note we need a different admin address in the release file compared to the test file) -> for the test file configure 'CX-Operation Customers'
as well as vault connection where the technical user details are stored

the wrapper itself should cover the following endpoint triggers:
! Please note: Step 1 & 2 is only needed once (basically after an env. refresh if no global account was created yet).

GET /gloablAccount
POST /parentGUID={your parent GUID}

{
  "description": "API generated BTP directory",
  "directoryAdmins": [
    "{email}" //fetched from the env. config file
  ],
  "displayName": "CX-Operation Customers", //fetched from the env. config file
  "labels": {
    "cloud_management_service": [
      "Created by API - Don't change it"
] }
}

Store the new created Directory GUID (where? tbd)

Create the customer sub-Account inside the wallet

{
  "betaEnabled": false,
  "description": "CX customer sub-account {companyName}",  //to be created automatically by static text + company name
  "displayName": "{companies.business_partner_number}_{companies.name}",  // TenantName of #453
  "labels": {
    "Cloud Management Service": [
      "Created by API - Don't change it"
    ],
    "tea_validity": [
      "Maximum 90 days"
    ] },
  "origin": "API",
  "parentGUID": "{{get_global_account_info.response.body.guid}}", // add the stored gloabl account GUID
  "region": "eu12",
  "subaccountAdmins": [
      "{email}" //fetched from the env. config file
    ],
  "subdomain": "test01",  // Change this
  "usedForProduction": "PRODUCTION"
}

Create a serviceManagerBinding (only needed for new GlobalAccounts - otherwise existing)

details unknown

Store tech. user details

details unknown

add cloudServiceManagement instance

details unknown

Note - from the description received from the DIM provider following tasks are not relevant:

adding entitlements should be not relevant
applicationSubscription not needed
CF not needed
applicationUsers

As soon as this is done, the service needs to proceed with setting up the tenant details.

The new repo was requested:
https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/issues/4322


Error: application/octet-stream is not supported

Describe the bug
Get error Error: application/octet-stream is not supported when trying to convert url to gif with command like:
https://asciinema.mydomain.com/a/MUmPbyFMlDiGTjzT8wVjeClcm output.gif
This seems to be related to S3 storage usage.
To Reproduce
Steps to reproduce the behavior:

Configure your asciinema server to store data to S3
Upload a cast
Convert the cast from the generated url to GIF with agg
See error

Expected behavior
The gif should be generated
Versions:

OS: macOS 14.7 && Ubuntu 22.04
agg: 1.4.3

Additional context
I disable S3 storage, and use local one -> works like a charm.
So the download from storage on S3 could be a lead.

Thanks for the detailed report. I'll try to get to the bottom of it.

It works by authorizing application/octet-stream in conditions, but I am not sure if it is the good method.
diff --git a/src/main.rs b/src/main.rs
index 1c6d503..b21e9fa 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -120,7 +120,7 @@ fn download(url: &str) -> Result<impl io::Read> {
         .get(url)
         .header(
             header::ACCEPT,
-            header::HeaderValue::from_static("application/x-asciicast,application/json"),
+            header::HeaderValue::from_static("application/x-asciicast,application/json,application/octet-stream"),
         )
         .build()?;

@@ -132,7 +132,7 @@ fn download(url: &str) -> Result<impl io::Read> {
         .and_then(|hv| hv.to_str().ok())
         .ok_or_else(|| anyhow!("unknown content type".to_owned()))?;

-    if ct != "application/x-asciicast" && ct != "application/json" {
+    if ct != "application/x-asciicast" && ct != "application/json" && ct != "application/octet-stream" {
         return Err(anyhow!(format!("{ct} is not supported")));
     }


Incorrect image grabbed as reference in Chrome - V0.13.0

When I run this in gather mode using the demo script I get an incorrect image returned in Chrome, for both the plain and text captures:

Firefox returns the correct images:

I have tried this out on a couple of other sites and it appears that Chrome is returning a portion of the screen to the top and left of the defined element/area.  Using github.com/jenkinsw1 as an example gives this (cssSelector of '.one-half:nth-child(1)'):
Chrome:

rather than this correct image in Firefox:

Are you running your tests on a MacBook with a retina display?
In this case, ChromeDriver returns 2x image, but spec requires the size to be equal to getBoundingClientRect(document.body) (firefox does this correctly regardless of display density). There was the confirmed issue about it on ChromeDrivers google code.
Unfortunately, we have no workaround at the moment, but we'll likely have a way of dealing with such issues in a next major release along with mobile support.

I am indeed!  Thanks for the info, I will try on a different machine for now.  Fantastic tool by the way, I think it is really going to be massively helpful for our testing here.

I am reopening the issue, since it has no solution at the moment and it will be a good place for your and the others to be notified when something changes

Why was this issue closed, is it still causing the same results?

I tried to reproduce it on latest chrome and got normal reference for it. Are you have some problems with it?

Yes I use a Macbook Pro with retina display, have got 2 standard monitors connected which I work from most of the time. When I drag my terminal to the retina display and run Gemini I get images that are doubled in pixel density, they look magnified.

When I drag my terminal to the retina display and run Gemini I get images that are doubled in pixel density

it's normal for retina. End each of your monitors has different resolution - it's also normal. Are you expect that images from devices with different resolutions will be the same?

It's not normal to see a web page like that though is it? The way it is displayed should look identical apart from any low resolution images etc

ok, I understood your position. we can scale images in html-report, but not image

It makes sense because for someone with only a retina display they will get the same benefits as everyone else in this context.

@sipayRT Any updates on this one?

no, nothing happened there, sorry


Not working with typescript: handler as string error

Hi,
I am getting an error when adding the middleware as a handler array in my function.
I am using typescript therefore my serverless file is a typescript file instead of yml:
Cannot load "serverless.ts": Initialization error: TSError: ⨯ Unable to compile TypeScript:
serverless.ts:45:4 - error TS2322: Type 'string[]' is not assignable to type 'string'.

functions: {
  index: {
	  handler: [
		  'lambdas/endpoints/common/middleware.publicAuth',
		  'lambdas/endpoints/common/default.index'],
	  events: [{
		  http: {
			  method: 'get',
			  path: '',
		  }
	  }]
  },

I am doing something wrong?
Thanks!

No. Typescript is just more strict than javascript.
Next version fo this library will use middlewares instead of handler solving this issue.


_combine_const() in pandas.sparse.frame does not have uniform method signature with pandas.core.frame

Code Sample
 >>> import pandas as pd
 >>> df = pd.DataFrame(np.zeros((4,5),dtype=int))
 >>> sparse = df.to_sparse()
 >>> sparse.loc[[1]] != 0
Expected Output
0      1      2      3      4
1  False  False  False  False  False
Observed Output
TypeError: _combine_const() got an unexpected keyword argument 'raise_on_error'
output of pd.show_versions()
INSTALLED VERSIONS
commit: None
python: 2.7.6.final.0
python-bits: 64
OS: Linux
OS-release: 4.2.0-35-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
pandas: 0.18.0
nose: None
pip: 8.1.1
setuptools: 20.9.0
Cython: None
numpy: 1.10.4
scipy: 0.16.1
statsmodels: None
xarray: None
IPython: None
sphinx: 1.3.1
patsy: None
dateutil: 2.5.2
pytz: 2016.3
blosc: None
bottleneck: None
tables: None
numexpr: None
matplotlib: 1.3.1
openpyxl: None
xlrd: None
xlwt: 1.0.0
xlsxwriter: None
lxml: None
bs4: None
html5lib: 0.999
httplib2: 0.8
apiclient: None
sqlalchemy: 1.0.11
pymysql: None
psycopg2: 2.6.1 (dt dec pq3 ext lo64)
jinja2: 2.8
boto: None
Reason
pandas.core.frame implements _combine_const(self, other, func, raise_on_error=True)
while pandas.sparse.frame implements _combine_const(self, other, func)
and the missing argument in the signature is the cause of the error when using sparse frames. This is raised due to the call res = self._combine_const(other, func, raise_on_error=False) from _comp_method_FRAME at pandas.core.ops

yeah guess we don't actually have an issue for this.

pull-requests welcome!

I thinking of working on this, however I have a small doubt: I noticed that pandas.sparse.frame has an unimplemented method astype.
In scope of the current scenario, it would work to use astype from pandas.core.generic so we could do away with the unimplemented method in pandas.sparse.frame. I am sure it was put there for a reason, I just can't see an immediate usage due to my novice pandas background.
Any help is appreciated :)

sparse does not have too much support for many dtypes atm; its not very general. but it is moving in the right directlion mostly by @sinhrks.  you are delving into a deep dark area of pandas.

@jreback I see. So how would you advice to address the current scenario, bypassing a complete solution for parse.sparse.frame astype().

I think @sinhrks would have better short-term advice.

I think we should have SparseDataFrame.astype to keep the impl same (xref #667). I have a draft of astype, and going to finish it by next release(0.18.2).

https://github.com/sinhrks/pandas/tree/sparse_dtype

Until then, adding more tests is appreciated.

@sinhrks  So the fix for inconsistent signatures should wait for the next release (0.18.2) ? Forgive me for paraphrasing.


embed iframe

Need to embed into chayn website. Below code should work:
<iframe src='https://little-window.herokuapp.com' style='position: fixed; bottom: 0; right: 0; max-height: 90vh; z-index:1000; margin-top:6%'></iframe>

will close as I've noticed there is already an issue about this 😅


Ensure proper test coverage for SSL/TLS implementation

We almost shipped a JDK 15 with a broken SSL/TLS implementation on all platforms (bug report). This was caused by https://github.com/AdoptOpenJDK/openjdk-build/pull/2033. I cannot find failing tests that are related to that problem in TRSS. But that may be due to my inexperience with TRSS.
We missed similar problems in the past but on a much smaller scale: https://github.com/AdoptOpenJDK/openjdk-support/issues/33. So it seems there's something amiss with out testing coverage.
Example of a broken nightly build: https://ci.adoptopenjdk.net/job/build-scripts/job/jobs/job/jdk11u/job/jdk11u-linux-x64-hotspot/716/

extended.jdk target was running weekly but has not been enabled in nightlies (due to lack of triage resources) - it would have some of the tests that would catch this issue as it includes jdk_security1, jdk_security2, jdk_security3, jdk_security4, jdk_security_infra make targets.
see https://github.com/AdoptOpenJDK/openjdk-tests/issues/1523 (less fun tasks for 2020 include triaging all extended.openjdk tests) and https://github.com/AdoptOpenJDK/openjdk-tests/issues/1522 (proposed additions to AQA v2)

Marked this as top priority, essentially re-enable extended.openjdk target and include it in the release pipeline.  If we do not have the resources to run it nightly, it can be run weekly but must be included in the release runs.
https://github.com/AdoptOpenJDK/openjdk-build/pull/2024 sets up the ability to define tests as nightly and weekly, and notes that a release build should include both sets of tests.

Ongoing work: https://github.com/AdoptOpenJDK/openjdk-tests/compare/master...aahlenst:security-tests

@aahlenst - see https://github.com/AdoptOpenJDK/openjdk-tests/compare/master...smlambert:secTests which takes the testcases from your branch, adds build/playlist/testng files so that the testcases will be run as part of our suite and produce junit style output.  New test target called SecurityTests is currently added into extended.functional.
Some sample Grinders:
jdk8 hotspot xlinux: Grinder/4599
jdk11 hotspot xlinux: Grinder/4600
jdk15 openj9 xlinux: Grinder/4601
jdk8 hotspot aarch64: Grinder/4602

Awesome, thanks.
Is there a good way for "automatic" version selection, for example "Run only on 11 and only if it's 11.0.9 or newer"?

If its at a test target level (all test cases in a group that is defined in a playlist), then a mechanism is the <subset> tag:
<test>
		<testCaseName>SecurityTests</testCaseName>
		<command>$(JAVA_COMMAND) $(JVM_OPTIONS) -cp $(Q)$(RESOURCES_DIR)$(P)$(TESTNG)$(P)$(TEST_RESROOT)$(D)SecurityTests.jar$(Q) org.testng.TestNG $(Q)$(TEST_RESROOT)$(D)testng.xml$(Q) -d $(REPORTDIR) -testnames SecurityTests -groups $(TEST_GROUP) -excludegroups $(DEFAULT_EXCLUDE); \
		$(TEST_STATUS)</command>
		<levels>
			<level>extended</level>
		</levels>
		<groups>
			<group>functional</group>
		</groups>
		<subsets>
			<subset>11</subset>
		</subsets>
	</test>

The subset tag is currently only at the granularity of major version (and can support special branches like Valhalla/Panama).  We do not currently have a mechanism to say 'only 11 and not less than 11.0.9', though may be useful to move that logic into a shared location for use by all tests.  We had not yet encountered a need to match on update versions.

<subsets>
    <subset>8</subset>
    <subset>11</subset>
</subset>

Is that legal syntax to express to run on 8 and 11 only? Is there some syntax to say 11 or newer?

... though may be useful to move that logic into a shared location for use by all tests. We had not yet encountered a need to match on update versions.

Do you think about a Java class or something to extend the XML declaration? We have plenty of use cases: JFR is only available on 8u262 or newer, TLS 1.3 only on 8u272 and newer, Shenandoah only on 11.0.9 and newer.

re: https://github.com/AdoptOpenJDK/openjdk-tests/issues/1963#issuecomment-724790298 that is correct syntax if you only want to run against 8 and 11.
<subsets>
    <subset>11+</subset>
</subset>

for version 11 and up (so since we are currently running jdk15 tests, then in practical terms, would show up in jdk11 and jdk15 pipelines... though if someone tried to run a jdk11-jdk16 pipelines, tests would be run in that range).
We were discussing an update to how we represent subsets / versions in playlist xml files, tagging @renfeiw who would have good insight into evolving what we can do there (and also because he is currently extending the playlist xml files to handle more granular exclusion capabilities).

re https://github.com/AdoptOpenJDK/openjdk-tests/issues/1963#issuecomment-724808372 We will update the tag "subset" to "version" later on to be more explicit. We are also thinking of using Interval notation such as [11, 11], [11.0.9, infinite) to represent java version more precisely.

thanks @renfeiw
@aahlenst - we can do this in stages, get your testing in place using PRE_223_PATTERN temporarily (with the plan to move the handling of more precise java version info to TKG in a second stage, need to create an issue so its not lost/forgotten)... or what is your preference?

I'll start with what we have and continue from there. Or even easier: We can just merge your branch Shelley if you convert it into a PR. Beforehand, it might make sense to run a grinder with a nightly from Sep. 13 or 14 to check that the tests fail.

jdk11 hotspot Grinder (on Sept 13th nightly) indeed shows the tests fail / catch the issue

Hooray! So after merging the PR, the last step is to enable nightly runs of those tests.

Because they are added into extended.functional, they will automatically be run nightly.


How to inference a M2M100 model?

I try to inference "alirezamsh/small100" with deepspeed and run into this error:
The tokenizer class you load from this checkpoint is not the same type as the class this function is called from. It may result in unexpected tokenization.
The tokenizer class you load from this checkpoint is 'M2M100Tokenizer'.
The class this function is called from is 'SMALL100Tokenizer'.

[2022-11-30 11:37:25,654] [INFO] [logging.py:68:log_dist] [Rank -1] DeepSpeed info: version=0.7.5, git-hash=unknown, git-branch=unknown
[2022-11-30 11:37:25,656] [INFO] [logging.py:68:log_dist] [Rank -1] quantize_bits = 8 mlp_extra_grouping = False, quantize_groups = 1
[2022-11-30 11:37:25,667] [INFO] [comm.py:618:init_distributed] Not using the DeepSpeed or dist launchers, attempting to detect MPI environment...
[2022-11-30 11:37:26,257] [INFO] [comm.py:675:mpi_discovery] Discovered MPI settings of world_rank=0, local_rank=0, world_size=1, master_addr=<IP_ADDRESS>, master_port=29500
[2022-11-30 11:37:26,259] [INFO] [comm.py:635:init_distributed] Initializing TorchBackend in DeepSpeed with backend nccl

---------------------------------------------------------------------------

RuntimeError                              Traceback (most recent call last)

[<ipython-input-8-d5cafc16db18>](https://localhost:8080/#) in <module>
     13                                  checkpoint=None,
     14                                  replace_method='auto',
---> 15                                  replace_with_kernel_inject=True)
     16 model = ds_engine.module
     17 output = model('Input String')

5 frames

[/usr/local/lib/python3.7/dist-packages/torch/distributed/distributed_c10d.py](https://localhost:8080/#) in new_group(ranks, timeout, backend, pg_options)
   2951         if group_world_size > global_world_size:
   2952             raise RuntimeError(
-> 2953                 "the new group's world size should be less or "
   2954                 "equal to the world size set by "
   2955                 "init_process_group"

RuntimeError: the new group's world size should be less or equal to the world size set by init_process_group

with this script:
from transformers import M2M100ForConditionalGeneration
from small100.tokenization_small100 import SMALL100Tokenizer
import deepspeed
import torch

model = M2M100ForConditionalGeneration.from_pretrained("alirezamsh/small100")
tokenizer = SMALL100Tokenizer.from_pretrained("alirezamsh/small100")

# Initialize the DeepSpeed-Inference engine
ds_engine = deepspeed.init_inference(model,
                                 mp_size=2,
                                 dtype=torch.half,
                                 checkpoint=None,
                                 replace_method='auto',
                                 replace_with_kernel_inject=True)
model = ds_engine.module
output = model('Input String')

The package versions on colab are:
deepspeed==0.7.5
transformers==4.24.0
torch @ https://download.pytorch.org/whl/cu113/torch-1.12.1%2Bcu113-cp37-cp37m-linux_x86_64.whl
torchtext==0.13.1

Hi @Bachstelze, your world size is set to 1 but your mp_size is set to 2. You should update your mp_size to be the same as world_size, the number of GPUs you are using.

`from transformers import M2M100ForConditionalGeneration
from small100.tokenization_small100 import SMALL100Tokenizer
import deepspeed
import torch
import os
model = M2M100ForConditionalGeneration.from_pretrained("alirezamsh/small100")
tokenizer = SMALL100Tokenizer.from_pretrained("alirezamsh/small100")
world_size = int(os.getenv('WORLD_SIZE', '1'))
Initialize the DeepSpeed-Inference engine
ds_engine = deepspeed.init_inference(model,
mp_size=world_size,
dtype=torch.half,
checkpoint=None,
replace_method='auto',
replace_with_kernel_inject=True)
model = ds_engine.module
output = model('Input String')`

from transformers import M2M100ForConditionalGeneration
from small100.tokenization_small100 import SMALL100Tokenizer
import deepspeed
import torch
import os

model = M2M100ForConditionalGeneration.from_pretrained("alirezamsh/small100")
tokenizer = SMALL100Tokenizer.from_pretrained("alirezamsh/small100")

world_size = int(os.getenv('WORLD_SIZE', '1'))

# Initialize the DeepSpeed-Inference engine
ds_engine = deepspeed.init_inference(model,
                                 mp_size=world_size,
                                 dtype=torch.half,
                                 checkpoint=None,
                                 replace_method='auto',
                                 replace_with_kernel_inject=True)
model = ds_engine.module
output = model('Input String')

Thanks a lot! That solved my problem!

from transformers import M2M100ForConditionalGeneration
from small100.tokenization_small100 import SMALL100Tokenizer
import deepspeed
import torch
import os

model = M2M100ForConditionalGeneration.from_pretrained("alirezamsh/small100")
tokenizer = SMALL100Tokenizer.from_pretrained("alirezamsh/small100")

world_size = int(os.getenv('WORLD_SIZE', '1'))

# Initialize the DeepSpeed-Inference engine
ds_engine = deepspeed.init_inference(model,
                                 mp_size=world_size,
                                 dtype=torch.half,
                                 checkpoint=None,
                                 replace_method='auto',
                                 replace_with_kernel_inject=True)
model = ds_engine.module
output = model('Input String')

but does that means that i can only use 1 GPU to infer? What if i need to use two GPU to infer the model, how can i write the code?

Mucalinda2436

did you solve this issue? : )

from transformers import M2M100ForConditionalGeneration
from small100.tokenization_small100 import SMALL100Tokenizer
import deepspeed
import torch
import os

model = M2M100ForConditionalGeneration.from_pretrained("alirezamsh/small100")
tokenizer = SMALL100Tokenizer.from_pretrained("alirezamsh/small100")

world_size = int(os.getenv('WORLD_SIZE', '1'))

# Initialize the DeepSpeed-Inference engine
ds_engine = deepspeed.init_inference(model,
                                 mp_size=world_size,
                                 dtype=torch.half,
                                 checkpoint=None,
                                 replace_method='auto',
                                 replace_with_kernel_inject=True)
model = ds_engine.module
output = model('Input String')

但这是否意味着我只能使用 1 个 GPU 来推断？如果我需要使用两个 GPU 来推断模型，我该如何编写代码？

did you solve this issue?

did you solve this issue? I need your help.

@123qwe-ux what is your concrete issue?
The code from @molly-smith solved my issue.

but does that means that i can only use 1 GPU to infer? What if i need to use two GPU to infer the model, how can i write the code?

@Mucalinda2436 I had only one GPU, so i could only use one. I guess that it works with more GPUs, if you change the world size.


Add inner forward/backward bridge redundancy lemmas

This resolves #161.

Could you move these lemmas between backward_bridge_absorption and send_channel_switch? I think that’s the place where they fit best.


IValidationOutputPort has no generic constraint

Does this mean it's possible to create an IValidationOutputPort that cannot be invoked by the Use Case Pipeline? (most likely)
If so, can anything be done about it at compile time? (probably not)
This will most likely need to be implemented as additional validation in registration to ensure that there are no IValidationOutputPorts that use a different TValidationResult than what the pipeline has registered.
This will also affect Business Rule Validation and Authorisation.

Changing an Output port to have object as the validation result causes the implemented validator to have a compile failure, since object does not implement IValidationResult. If the validator is commented out, validation then fails because IValidationOutputPort is not registered.
Trying to change the pipe registration from ValidationResult to object then causes a compile failure, since object does not implement IValidationResult.
There is currently no mechanism to allow the Output Port's validation result to successfully not be an IValidationResult, so it should probably be a generic constraint on IValidationOutputPort.

Another alternative would be to add some kind of marker interface between TValidationFailure and IValidationResult such that the compiler can still have errors for validators when the output port doesn't support validation.

Constrained the IAuthorisationOutputPort, IBusinessRuleValidationOutputPort, and IValidationOutputPort interfaces


Add a warning about not being able to reference pipelines in an artifact

In section Insert a template the second paragraph states:
Template files need to exist on your filesystem at the start of a pipeline run. You can't reference templates in an artifact
I think this should be made more explicit by changing it to either a information or warning box as this information is very usefull when starting to work with pipeline resources and could save a lot of time.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 6724abea-bbdc-bf66-ed5e-3214fa6c3e66
Version Independent ID: 4f8dab21-3f0e-da32-cc0e-1d85c13c0065
Content: Templates - Azure Pipelines
Content Source: docs/pipelines/process/templates.md
Product: devops
Technology: devops-cicd-process
GitHub Login: @juliakm
Microsoft Alias: jukullam

Thanks @CCostaT. I'll make it a larger warning.


[Question] Is this a new course that hasn't come out yet or your DDD course?

It seems you haven't committed in 2 months. Is this course still going to be made?

I do commits, just don't push them to remote, not to spoil the content.

Awesome thanks!


Mac agent unable to restore nuget packages.

Description
We recently see the image version is update to '20220614.2' and from then we see the nuget package failures.

" Restoring packages for /Users/runner/work/1/s/VI.iOS/VI.iOS.csproj...
/Library/Frameworks/Mono.framework/Versions/6.12.0/lib/mono/msbuild/Current/bin/NuGet.targets(131,5): error : Unable to resolve 'Xam.Plugin.LatestVersion (>= 2.1.0)' for 'Xamarin.iOS,Version=v1.0'. [/Users/runner/work/1/s/VI.iOS/VI.iOS.csproj]
/Library/Frameworks/Mono.framework/Versions/6.12.0/lib/mono/msbuild/Current/bin/NuGet.targets(131,5): error : Unable to resolve 'Xamanimation (>= 1.3.0)' for 'Xamarin.iOS,Version=v1.0'. [/Users/runner/work/1/s/VI.iOS/VI.iOS.csproj]
...
...
...
  Committing restore...
  Generating MSBuild file /Users/runner/work/1/s/VI.iOS/obj/VI.iOS.csproj.nuget.g.props.
  Generating MSBuild file /Users/runner/work/1/s/VI.iOS/obj/VI.iOS.csproj.nuget.g.targets.
  Writing assets file to disk. Path: /Users/runner/work/1/s/VI.iOS/obj/project.assets.json
  Failed to restore /Users/runner/work/1/s/VI.iOS/VI.iOS.csproj (in 432 ms).
 NuGet Config files used:
      /Users/runner/.config/NuGet/NuGet.Config
Done Building Project "/Users/runner/work/1/s/VI.iOS/VI.iOS.csproj" (Clean;Restore target(s)) -- FAILED.

Build FAILED.
...
...
##[error]Error: The process '/Library/Frameworks/Mono.framework/Versions/Current/Commands/msbuild' failed with exit code 1
Finishing: MSBuild

Platforms affected

[X] Azure DevOps
[ ] GitHub Actions

Virtual environments affected

[ ] Ubuntu 18.04
[ ] Ubuntu 20.04
[ ] Ubuntu 22.04
[ ] macOS 10.15
[X] macOS 11
[ ] macOS 12
[ ] Windows Server 2019
[ ] Windows Server 2022

Image version and build link
Environment: macos-11
Version: 20220614.2

Starting: Initialize job
Agent name: 'Azure Pipelines 2'
Agent machine name: 'Mac-1655484182240'
Current agent version: '2.204.0'
Operating System
Virtual Environment
Virtual Environment Provisioner
Current image version: '20220614.2'
Agent running as: 'runner'
Prepare build directory.
Set build variables.
Download all required tasks.
Downloading task: NuGetToolInstaller (0.202.0)
Downloading task: replacetokens (3.10.0)
Downloading task: MSBuild (1.199.0)
Downloading task: InstallAppleProvisioningProfile (1.200.0)
Downloading task: InstallAppleCertificate (2.200.0)
Downloading task: ios-bundle-version (1.0.0)
Downloading task: XamariniOS (2.200.1)
Downloading task: CopyFiles (2.200.0)
Downloading task: PublishBuildArtifacts (1.200.0)
Checking job knob settings.
   Knob: AgentToolsDirectory = /Users/runner/hostedtoolcache Source: ${AGENT_TOOLSDIRECTORY}
Finished checking job knob settings.
Start tracking orphan processes.

Is it regression?
Yes. Build was successful in image version 20220605.1
Expected behavior
Build should be successful with any issues.
Actual behavior
Failed to restore nuget packages.
Repro steps
I just ran the build, no specific steps followed.

Same is happening to my team.
We cannot generate any build with the latest from macos-latest, or any other version.
The last image version (20220605.1) was working successfully

Same issue is happening to our project.
And my workaround below that add a step...
    - name: Setup NuGet.Config
      run: echo '<configuration><packageSources><add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" /></packageSources></configuration>' > ~/.config/NuGet/NuGet.Config

@keiji could you please let us know where we need to add this.
  - name: Setup NuGet.Config
     run: echo '<configuration><packageSources><add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" /></packageSources></configuration>' > ~/.config/NuGet/NuGet.Config

In my case, macos-latest image has empty NuGet.Config like that.
Run cat ~/.config/NuGet/NuGet.Config
<?xml version="1.0"?>
<configuration>
  <packageSources>
  </packageSources>
</configuration>

We can add Nuget repository url to NuGet.Config.
https://docs.microsoft.com/en-us/nuget/reference/nuget-config-file
https://api.nuget.org/v3/index.json is NuGet repository(nuget.org) url that our project need.

In the above task we are trying to restore the nuget packages, could you please let us know if we need to add the Nuget.Config file in the project or add from pipeline yml file?
If it is from the pipeline yml could you please elaborate, also can you provide the modified Nuget.Config file?

@uragonda-rajesh
I don't know what NuGet packages is depended from your project.
I recommend you check which NuGet repository is using for your project.
NuGet.Config structure is not complicated. You can create NuGet.Config easily 😃
And my workaround is just temporary.
I will remove this workaround step if macos-latest image is updated.

@uragonda-rajesh Hi!
Thanks! We will take a look.

The same is happening with our projects too. When can we expect a fix for this? We are stuck because of this issue.

@rubverma @vtamanam and all the others who are experiencing the issue.
Could you try running the following snippet and report back if it helps?
rm -rf ~/.config/NuGet/NuGet.Config
dotnet nuget list source

@miketimofeev
Welcome to .NET 5.0!
---------------------
SDK Version: 5.0.408
Telemetry
---------
The .NET tools collect usage data in order to help us improve your experience. It is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.
Read more about .NET CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry
----------------
Installed an ASP.NET Core HTTPS development certificate.
To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only).
Learn about HTTPS: https://aka.ms/dotnet-https
----------------
Write your first app: https://aka.ms/dotnet-hello-world
Find out what's new: https://aka.ms/dotnet-whats-new
Explore documentation: https://aka.ms/dotnet-docs
Report issues and find source on GitHub: https://github.com/dotnet/core
Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli
--------------------------------------------------------------------------------------
Registered Sources:
  1.  MyNuget [Enabled]
      /Users/runner/work/cocoa/cocoa/TempNugetFeed
  2.  nuget.org [Enabled]
     [ https://api.nuget.org/v3/inde](https://api.nuget.org/v3/index.json)

And I have removed ~/.config/NuGet/NuGet.Config. The workflow works well.

@miketimofeev thank you for the solution. This is working.

This workaround works:
Quote:
"I ran into this on a project I'm on, and while I don't know exactly what's causing it, I do know a solution (which might help support figure out what's going on). It's acting like it doesn't have any nuget sources, so placing a nuget.config file in the same directory as your solution, with this as the contents:"

Original post:
https://github.com/microsoft/azure-pipelines-tasks/issues/16465#issuecomment-1159289085

@miketimofeev Thank for solution. Now we We are able to generate build using macos-latest

We will deploy new images with the fix in the next 2-3 business days.

@miketimofeev
If understood correctly you're using pwsh which is Powershell Core right? PowerShell Core should be using updated NuGet.Configuration.dll, and should not be creating an empty nuget.config.
Fyi @zivkan.

@erdembayar correct, but the empty config file is being created after any powershell module installation, for example, Az.

Az

Is it the one https://docs.microsoft.com/en-us/powershell/azure/install-az-ps?view=azps-8.0.0?
What happens if you try previous version like 7.0? Does it non-empty nuget.config file?

@miketimofeev The bash commands just helped unblock a restore and build for me. +1

@al-cheb When I test (on Windows) with PowerShell Core 7.2.4 (and Get-Module PackageManagement says version 1.4.7), I don't get this behaviour. It doesn't create the nuget.config at all, meaning the first time the dotnet cli runs, NuGet creates its own default.
I don't know what OneGet is, but someone should report to them that they're creating a different default to the official NuGet client, and this is causing customer problems.
For what it's worth, I recommend to EVERYONE to use dotnet new nugetconfig in your own repo root, and commit it. It creates a nuget.config that uses <clear/> to remove any inherited package sources, and adds nuget.org. This way your repo is not affected by machine state, which is much more important on CI agents where the VM is not wiped clean between every run. If you check Microsoft repos on github, I expect every single one of them will have their own nuget.config which clears inherited package sources.

@al-cheb When I test (on Windows) with PowerShell Core 7.2.4 (and Get-Module PackageManagement says version 1.4.7), I don't get this behaviour. It doesn't create the nuget.config at all, meaning the first time the dotnet cli runs, NuGet creates its own default.
I don't know what OneGet is, but someone should report to them that they're creating a different default to the official NuGet client, and this is causing customer problems.
For what it's worth, I recommend to EVERYONE to use dotnet new nugetconfig in your own repo root, and commit it. It creates a nuget.config that uses <clear/> to remove any inherited package sources, and adds nuget.org. This way your repo is not affected by machine state, which is much more important on CI agents where the VM is not wiped clean between every run. If you check Microsoft repos on github, I expect every single one of them will have their own nuget.config which clears inherited package sources.

@zivkan , I can easily reproduce as well on Windows:
PS > $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.2.5
PSEdition                      Core
GitCommitId                    7.2.5
OS                             Microsoft Windows 10.0.22000
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>
WSManStackVersion              3.0

PS > gc $env:USERPROFILE\AppData\Roaming\NuGet\nuget.config -ea 0
PS > Find-Package ImportExcel

Name                           Version          Source           Summary
----                           -------          ------           -------
ImportExcel                    7.6.0            PSGallery        PowerShell module to import/export Excel spreadsheets…

PS > gc $env:USERPROFILE\AppData\Roaming\NuGet\nuget.config -ea 0
<?xml version="1.0"?>
<configuration>
  <packageSources>
  </packageSources>
</configuration>

info:
DEBUG: 00:00:00.0432323 Create a file 'C:\Users\user\AppData\Roaming\NuGet\nuget.config'.
DEBUG: 00:00:00.0436914 Calling 'NuGetRequest'::'RegisteredPackageSources', 'C:\Users\user\AppData\Roaming\NuGet\nuget.config'.
DEBUG: 00:00:00.0440550 Loading a configuration from file 'C:\Users\user\AppData\Roaming\NuGet\nuget.config'.
DEBUG: 00:00:00.0451948 Loaded a configuration from file 'C:\Users\user\AppData\Roaming\NuGet\nuget.config'.

Has been deployed.

Eventually, yes, I'm sure there will be. But it's complicated.
The PR I linked to is for a module called PackageManagement, and the version with the fix is here: https://www.powershellgallery.com/packages/PackageManagement/1.4.8. Notice how it says the package is unlisted. More on that below.
However, when I looked at PowerShell Core's repo for the dependabot upgrade of this module, I found this: https://github.com/PowerShell/PowerShell/pull/17606
It was closed because of this issue: https://github.com/OneGet/oneget/issues/533.  Hence PackageManagement version 1.4.8 was unlisted because it was causing issues unrelated to the nuget.config file change.
So now the process is:

https://github.com/OneGet/oneget/issues/533 needs to be fixed
New version of PackageManagement published to PowerShell Gallery
dependabot to create PR on https://github.com/PowerShell/PowerShell to update to whatever this new version is
After dependabot's PR is merged, pwsh needs to release a new version
actions/virtual-environments needs to use that new version of pwsh

So, at this time, you're best off following the PowerShell repo. For what it's worth, I'm not going to be following up on this myself, and since pwsh is open on github, you can follow it as easily as I can.
Note that the above is only for PowerShell Core (pwsh). For Windows PowerShell (powershell.exe), it turns out a completely different team in Microsoft manage it (some team in Windows servicing).  I've been super busy this week and haven't had time to follow up, but now that I learned that PackageManagement has a bug, I'll just wait for that to be fixed first.
It's highly likely that PowerShell Core is going to update before Windows PowerShell (after all, WinPS needs a Windows Update), so my best suggestion is to try to migrate off Windows PowerShell onto PowerShell Core, where possible. But this issue is about Mac agents, so WinPS is out of scope anyway.
I still HIGHLY recommend everyone run dotnet new nugetconfig in their repo root, add any package sources your repo needs (remove nuget.org if desired), and commit it. If your repo already has a nuget.config, then make sure <clear /> is in the package sources section before any other source. It makes your repo less prone to machine state, which is good for build reliability and reproducability.


refactor(@angular/build): add initial infrastructure to support inline template HMR

The Angular AOT compilation logic for a rebuild has been updated to include infrastructure for additional checks of stale TypeScript files against updated files. The actual comparison aspects have not yet been implement and no behavior changes are yet present for template HMR.

The changes were merged into the following branches: main, 19.0.x


Is there mimc hash implemented by solidity language

we are constructing a gnark proof system on ethereum.  the public input part need be verified by mimc hash on solidity contract as the circuit implemented with gnark.  could you tell me if there is corresponding solidiy implement to mimc hash in gnark? many thanks!

is this solidity implementation match to gnark's mimc hash?
https://gist.github.com/HarryR/80b5ff2ce13da12edafda6d21c780730

Hi @mdj33 , there is a discrepancy on our end, the comment on our mimc implementation says that it follows the Miyaguchi–Preneel scheme while it's in fact the Matyas–Meyer–Oseas scheme. The mimc encryption function on the other hand is the same (except that we use 5 for the exponent). It will be fixed on our side to follow Miyaguchi–Preneel.

@ThomasPiellard , it is ok. we have modified HarryR's solidity mimc implement to adapt gnark's for the time being.

@ThomasPiellard  @gbotrel , BTW,   Is there sha256 or keccak256 hash calculating circuit gadgets for gnark?  It will save more gas to calculate hash by sha256 instead of mimc on ETH.

No those hash functions are not implemented. It's our plan to add it at some point though. If you plan to add it soon on your side, don't hesitate to open a PR so we can look at it and integrate it in the std/.

it is ok, thanks!


Bump minor version to reflect API changes

Specifically companies.getById

Hey, I think this is included in the latest version, so I'm going to close this.


Error while installing

Defaulting to user installation because normal site-packages is not writeable
Collecting git+https://github.com/PteroPackages/Pytero
Cloning https://github.com/PteroPackages/Pytero to /tmp/pip-req-build-yfi10fef
Running command git clone --filter=blob:none --quiet https://github.com/PteroPackages/Pytero /tmp/pip-req-build-yfi10fef
Resolved https://github.com/PteroPackages/Pytero to commit de38e1a648c2ec00f8843ee2bd04fc6d53d0a9d7
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [18 lines of output]
Traceback (most recent call last):
File "", line 2, in
File "", line 34, in
File "/tmp/pip-req-build-yfi10fef/setup.py", line 12, in
from pytero import version
File "/tmp/pip-req-build-yfi10fef/pytero/init.py", line 13, in
from .app import PteroApp
File "/tmp/pip-req-build-yfi10fef/pytero/app.py", line 12, in
from .node import Node
File "/tmp/pip-req-build-yfi10fef/pytero/node.py", line 2, in
from .servers import AppServer
File "/tmp/pip-req-build-yfi10fef/pytero/servers.py", line 2, in
from .types import _Http, Allocation, Container, Egg, FeatureLimits, Limits,
File "/tmp/pip-req-build-yfi10fef/pytero/types.py", line 40, in
class _Http:
File "/tmp/pip-req-build-yfi10fef/pytero/types.py", line 43, in _Http
_raw: Callable[[str, str, Any | None], Any]
TypeError: unsupported operand type(s) for |: '_SpecialForm' and 'NoneType'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

What version of Python are you using?

3.9

I think pip may have missed something here — the minimum supported version is 3.10 so it shouldn't have even installed. Upgrading your Python install should fix this.


[admin-tool][data-recovery] Added handling for batch stores during store repush.

Summary
[WORK IN PROGRESS] This set of changes adds additional logic for handling batch stores during a repush request. Additionally, this commit moves some functionality for determining whether or not a store can be repushed to the task execution level, parallelizing a previously introduced single-threaded linear check.
How was this PR tested?
Tested on a couple EI stores.
$ java -jar venice-admin-tool-all.jar --execute-data-recovery --recovery-command venice-tools --stores akozma_test_store_EI,HB_VPJtarget_ei-venice-0,cert-histogram-dataset-copy --source-fabric ei-ltx1 --dest-fabric ei-ltx1 --extra-command-args 'repush kafka --force --format' --datetime "2023-07-24T20:00:00" --url "http://ltx1-app5774.stg.linkedin.com:1576"
2023-07-19 14:14:36 INFO [DataRecoveryExecutor] [main] [store: akozma_test_store_EI, status: started, message: failure: find ongoing push, version: 5]
2023-07-19 14:14:36 INFO [DataRecoveryExecutor] [main] [store: cert-histogram-dataset-copy, status: started, message: failure: find ongoing push, version: 20]
2023-07-19 14:14:36 INFO [DataRecoveryExecutor] [main] [store: HB_VPJtarget_ei-venice-0, status: started, message: failure: find ongoing push, version: 17085]
2023-07-19 14:14:36 INFO [DataRecoveryExecutor] [main] [store: akozma_test_store_EI, status: started, message: failure: find ongoing push, version: 5]
2023-07-19 14:14:36 INFO [DataRecoveryWorker] [main] Total: 3, Succeeded: 3, Error: 0, Uncompleted: 0

Does this PR introduce any user-facing changes?

[x] No. You can skip the rest of this section.
[ ] Yes. Make sure to explain your proposed changes and call out the behavior change.

https://github.com/linkedin/venice/pull/550 new PR here


Load CSKG data at startup from /data instead of forcing users to interact with the import controller

More user-friendly.
Need to record which files have already been loaded. Shouldn't assume the /data directory is read-write, so can't just put a .loaded semaphore alongside the file. Hash the file and keep the hashes in the database?

As a stopgap, only load the database from /data if the database is empty.


Improve chinese translation

Improved the Chinese translation of everything up to table of contents, including the relevant entries in TOC.
Some translation was based on the latest English readme, instead of mere improvements over the existing translation.
The Guides and Similar Projects sections haven't yet been included in the translated readme.

I'm submitting a pull request now since I'm not 100% sure I'll have time to work on the remainder (likely I will, but not sure). The existing work was very much out of a moment of passion.

Thank you so much! This is super helpful :)


Renaming files not logged correctly in Activity Log

Reported by: Rick Klein on May 20, 2015
This problem appears in Chrome
Steps:

Go to an OSF project page where you have admin/read write permissions
Click "files" tab at top of page
Upload a file
Click next to the file name to select it
A toolbar with "rename" should pop up
Click rename, and input a new file name.
Click rename again to make the change.
Check the activity log.

Expected behavior:
Activity log will display that the file was renamed.
Actual behavior:
Activity log displays a series of new uploads and file movements but it is unclear that a file was renamed.
@caileyfitz said: Example of renaming a folder: was named perro, is now named dog!

@lbanner can I work on this?


Dynamically Update Pinned Environment Views on Snapshot Unpause

Currently if a snapshot is unpaused (applied to prod) then existing environments will continue to point to the temp table despite the fact that the change is now live in production. The goal of this change is to update these existing views to now point to prod instead of the temp table.
One challenge with this is that the number of environments could be N and therefore this could be an expensive operation. Therefore a way to reduce N is to say that we will only updated pinned environments. This gives an extra property to pinned environments that they will be automatically refreshed on changes like this and help support their goal of being long-running environments.

doesn't seem like anyone has asked for this closing


Update core.py

Types of changes

[ ] Docs change / refactoring / dependency upgrade
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Motivation and Context / Related issue
there is a non-zero probability that this fixes a bug
How Has This Been Tested (if it applies)

Checklist

[x] The documentation is up-to-date with the changes I made.
[x] I have read the CONTRIBUTING document and completed the CLA (see CONTRIBUTING).
[x] All tests passed, and additional code has been covered with new tests.

Thanks, but the problem was coming from my code instead ;)


Spork doesn't reload I18n translations from config/locales

Spork doesn't reload I18n translations from config/locales. So I see old translations until I reload spork.
Spork 0.9.0.rc.2, Rails 3

Thanks @nickhoffman, that worked, I guess you can close the issue


fix:  make js updates only for application js objects

Description
update should happen only for js objects which are created on a page not for js modules and it's js objects. Adding sanity check which uses selector to fetch only js objects created on page
PR fixes following issue(s)
Fixes # (issue number)

if no issue exists, please create an issue and ask the maintainers about this first

Media

A video or a GIF is preferred. when using Loom, don’t embed because it looks like it’s a GIF. instead, just link to the video

Type of change

Please delete options that are not relevant.

Bug fix (non-breaking change which fixes an issue)
New feature (non-breaking change which adds functionality)
Breaking change (fix or feature that would cause existing functionality to not work as expected)
Chore (housekeeping or task changes that don't impact user perception)
This change requires a documentation update

Testing

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Also list any relevant details for your test configuration.
Delete anything that is not relevant

[ ] Manual
[ ] JUnit
[ ] Jest
[ ] Cypress

Test Plan

Add Testsmith test cases links that relate to this PR

Issues raised during DP testing

Link issues raised during DP testing for better visiblity and tracking (copy link from comments dropped on this PR)

Checklist:
Dev activity

[ ] My code follows the style guidelines of this project
[ ] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[ ] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes
[ ] PR is being merged under a feature flag

QA activity:

[ ] Speedbreak features have been covered
[ ] Test plan covers all impacted features and areas of interest
[ ] Test plan has been peer reviewed by project stakeholders and other QA members
[ ] Manually tested functionality on DP
[ ] We had an implementation alignment call with stakeholders post QA Round 2
[ ] Cypress test cases have been added and approved by SDET/manual QA
[ ] Added Test Plan Approved label after Cypress tests were reviewed
[ ] Added Test Plan Approved label after JUnit tests were reviewed

/ok-to-test


Add option to disable streaming #289

Hi @TheR1D , thanks for the feedback. I am happy to implement this, and I think typer has some nice progress indicators, but my only concern is that it changes the output of the command. For example, if someone were to pipe the output of the sgpt command, would we get “Loading…” in that output?

Hi @TheR1D , thanks for the feedback. I am happy to implement this, and I think typer has some nice progress indicators, but my only concern is that it changes the output of the command. For example, if someone were to pipe the output of the sgpt command, would we get “Loading…” in that output?

The answer is no, as we would replace the "Loading..." line with the desired output. While our application is running, we can manipulate the stdout stream as needed. Here is a simple illustration:
import time

print("loading...", end="\r")
time.sleep(2)  # simulate waiting for data
print("Here is the actual data.")

The technique involves the use of the carriage return character (\r). This character when printed returns the print head back to the start of the line. So, any subsequent print will overwrite the existing content of the line. However, Typer allows us to execute this in a more elegant manner.

@TheR1D I have added a loading message now - thanks!


Unable to build refmt.js

Able to build reason on 4.04.2, but unable to do so on 4.02.3. But first, just to get to the point of trying to build reason I had to:

install merlin-extend and utop into the 4.02.3 switch (I also think I had to install utop on 4.04.2, which wasn't mentoned in the build instructions)
change js_of_ocaml.exe to js_of_ocaml in bspacks/reason_bspack.sh

This is the log from running reason_bspack.sh:
**This script is switching you to ocaml 4.02.3 for the subsequent bspacking. Please switch back to your own version afterward. Thanks!**\n
# To setup the new switch in the current shell, you need to run:
eval `opam config env`
~/dev/remote/_/reason/bspacks ~/dev/remote/_/reason/bspacks
make: Entering directory '/home/glennsl/dev/remote/_/reason'
rm -rf ./formatTest/**/actual_output
rm -f ./formatTest/failed_tests
rm -f ./miscTests/reactjs_jsx_ppx_tests/*.cm*
jbuilder clean
make: Leaving directory '/home/glennsl/dev/remote/_/reason'
make: Entering directory '/home/glennsl/dev/remote/_/reason'
jbuilder build
    ocamldep src/reason-merlin/ocamlmerlin_reason.depends.ocamldep-output
    ocamldep src/ppx/ppx_react.depends.ocamldep-output
    ocamldep src/refmt/refmt_impl.depends.ocamldep-output
    ocamldep src/refmttype/reason_format_type.depends.ocamldep-output
    ocamldep src/reason-parser-tests/testOprint.depends.ocamldep-output
    ocamldep src/reason-parser/vendor/easy_format/reason.easy_format.dependsi.ocamldep-output
    ocamldep src/reason-parser/vendor/easy_format/reason.easy_format.depends.ocamldep-output
    ocamldep src/generate/select.depends.ocamldep-output
    ocamllex src/reason-parser/reason_lexer.ml
    ocamldep src/reason-parser/menhir_error_processor.depends.ocamldep-output
    ocamldep src/rtop/rtop.depends.ocamldep-output
    ocamldep src/ppx/ppx_react.dependsi.ocamldep-output
    ocamldep src/reason-parser/vendor/cmdliner/reason.cmdliner.dependsi.ocamldep-output
    ocamldep src/reason-parser/vendor/cmdliner/reason.cmdliner.depends.ocamldep-output
      ocamlc src/reason-parser/vendor/easy_format/easy_format.{cmi,cmti}
      ocamlc src/generate/select.{cmi,cmo,cmt}
      ocamlc src/reason-parser/menhir_error_processor.{cmi,cmo,cmt}
      ocamlc src/reason-parser/vendor/cmdliner/cmdliner.{cmi,cmti}
      ocamlc src/reason-parser/vendor/easy_format/easy_format.{cmo,cmt}
    ocamlopt src/generate/select.{cmx,o}
    ocamlopt src/reason-parser/vendor/easy_format/easy_format.{cmx,o}
    ocamlopt src/reason-parser/menhir_error_processor.{cmx,o}
      ocamlc src/reason-parser/vendor/easy_format/reason.easy_format.cma
  ocamlbuild src/reasonbuild/myocamlbuild
/home/glennsl/.opam/4.02.3/bin/ocamlopt.opt unix.cmxa -I /home/glennsl/.opam/4.02.3/lib/ocaml/ocamlbuild /home/glennsl/.opam/4.02.3/lib/ocaml/ocamlbuild/ocamlbuildlib.cmxa myocamlbuild.ml /home/glennsl/.opam/4.02.3/lib/ocaml/ocamlbuild/ocamlbuild.cmx -o myocamlbuild
    ocamlopt src/generate/select.exe
        bash src/reason-parser/reason_parser.messages (exit 1)
(cd _build/default/src/reason-parser && /usr/bin/bash -e -u -o pipefail -c 'menhir --explain --strict --unused-tokens ./reason_parser.mly --update-errors ./reason_parser.messages.checked-in | sed -e '\''s/[[:space:]]*$$//g'\''') > _build/default/src/reason-parser/reason_parser.messages
File "/home/glennsl/.opam/4.02.3/lib/menhir/standard.mly", line 193, characters 8-21:
Error: symbol nonempty_list(attribute) is unreachable from any of the start symbol(s).
make: *** [Makefile:8: build] Error 1
make: Leaving directory '/home/glennsl/dev/remote/_/reason'
File "src/reason-parser/reason_lexer.mll", line 70, characters 5-18:
Error: Unbound module Reason_parser
File "src/reason-parser/reason_lexer.mll", line 70, characters 5-18:
Error: Unbound module Reason_parser
findlib: [WARNING] Interface topdirs.cmi occurs in several directories: /home/glennsl/.opam/4.02.3/lib/ocaml, /home/glennsl/.opam/4.02.3/lib/ocaml/compiler-libs
File "./refmtJsApi.ml", line 1, characters 12-41:
Error: Unbound module Refmt_api
findlib: [WARNING] Interface topdirs.cmi occurs in several directories: /home/glennsl/.opam/4.02.3/lib/ocaml, /home/glennsl/.opam/4.02.3/lib/ocaml/compiler-libs
File "_none_", line 1:
Error: Cannot find file /home/glennsl/dev/remote/_/reason/bspacks/build/refmt_api_entry.cmo
js_of_ocaml: Error: Sys_error("/home/glennsl/dev/remote/_/reason/bspacks/build/refmt_api_final.byte: No such file or directory")
ERROR - Cannot read file /home/glennsl/dev/remote/_/reason/bspacks/build/refmt_pre_closure.js: {1}

1 error(s), 0 warning(s)
./reason_bspack.sh: line 105: /home/glennsl/dev/remote/_/reason/bspacks/build/refmt_binary.byte: No such file or directory
{}
/home/glennsl/dev/remote/_/reason/bspacks/testRefmtJs.js:4
console.log(refmt.printRE(refmt.parseRE(`let f = (a) => a + 1; print_int(f(5))`)))
                                ^

TypeError: refmt.parseRE is not a function
    at Object.<anonymous> (/home/glennsl/dev/remote/_/reason/bspacks/testRefmtJs.js:4:33)
    at Module._compile (module.js:660:30)
    at Object.Module._extensions..js (module.js:671:10)
    at Module.load (module.js:573:32)
    at tryModuleLoad (module.js:513:12)
    at Function.Module._load (module.js:505:3)
    at Function.Module.runMain (module.js:701:10)
    at startup (bootstrap_node.js:190:16)
    at bootstrap_node.js:662:3

▶ uname -a
Linux **** 4.14.15-1-ARCH #1 SMP PREEMPT Tue Jan 23 21:49:25 UTC 2018 x86_64 GNU/Linux

Seems like a menhir version problem. I'll check what I have tomorrow


Feat: Add toastify Message

Describe the feature
After hitting submit under contact section, instead of plain text I wish to add a creative toastify message of "Thank you! We will connect soon"
Please assign me this issue under GSSOC'24
Add ScreenShots

Record

[X] I agree to follow this project's Code of Conduct
[X] I'm a GSSOC'24 contributor
[ ] I'm a VSoC'24 contributor
[X] I want to work on this issue

@anagha-chaudhari, it would be great if you could send some screenshots to illustrate what you'd like to add.

These are just for sample reference, I will keep in mind the theme of Help-Ops-Hub while adding the toastified message

@anagha-chaudhari, great! You're assigned. Please focus on adding only the essential code needed for functionality. If any modifications are necessary, approach them professionally and prioritize clarity.

Don't forget to join our official Discord server.
And also follow us on Linkedin
And please ⭐ our repo

@mdazfar2 okay sure, I will keep that in mind! Thank you for assigning


Externalise env modules into the nextflow config file

Shows how externalise modules and how to create separate config profiles

Seriously? This works? Haha, that's awesome. Much better than what we have. Thanks!

Ok, this is great - we can move all of the stuff in example_uppmax_config into this file under a profile as well and users won't have to copy and paste the file as we're currently telling them to.
Thanks! 👍

Exactly, or include that file into a profile https://www.nextflow.io/docs/latest/config.html#config-include

Even better - that will be more readable then. This is great, thanks!

Is it possible to set a default value for -profile in a user config file?

Do you mean a default profile name (that's standard) or default config attribute(s)?

So if I have a profile called uppmax, always use that by default instead of standard (so that I don't have to do -profile uppmax every time I run a pipeline).
I don't want to call the profile standard as then it'll be the default for everyone who runs the pipeline.

I see. The default one is standard and it's not possible to override it.

Ok, thanks. I'll just call it standard then and anyone running the pipeline elsewhere can override the settings with their ~/.nextflow/config config file then I guess.

Um, they can override it providing a config file in the launching dir. The ~/.nextflow/config won't work. The priority is the following (from lower to higher):

~/.nextflow/config
Pipeline config
Launching config
Command line options

huh, ok that's not ideal. Is the Launching config one specified on the command line with -c?
I guess -c ~/my_profile.config is pretty much the same as -profile my_profile

Yes, you can also use a separate config with the -c option .

Final (?) question - is it possible to know what profile was used inside the nextflow script?

Yes, by using the workflow.profile implicit variable. See here.

Gotcha, thanks 👍  Apologies - did search the docs before asking but it didn't come up..

No pb. You are welcome.


[WIP] Plugin System

Work in progress, because documentation is missing.
For details, see also #61.

I will add more plugin interfaces in a next pull request. Since the basics for the plugin system are there, I’ll merge this one.


samples tests flaky failures

Several risk samples test often fail (making about 1 out of 2 nightly runs fail). For example, these two tests failed in the 4 recent nightly runs:
✖ risk › should perform k-map analysis on a single field
https://circleci.com/gh/googleapis/nodejs-dlp/1770
✖ risk › should perform k-anonymity analysis on a single field
https://circleci.com/gh/googleapis/nodejs-dlp/1753
Having flaky tests is probably worse than having no tests, because, as a result, we never pay any attention to nightly failures. I suggest that we either investigate and fix the tests, or disable the failing tests to have a green CI all the time.
Cc: @crwilcox, @jmdobry

I took a gander at the job history for longdoor and don't see failures, however the last line of the sample
return new Promise(resolve => setTimeout(resolve(jobName), 500));
just assumes the job is going to finish in a set amount of time ... but these things  can get delayed if there are a lot of other jobs in the queue. By design this test will be brittle as it's hard to guarantee a long running operation completes in a set amount of time, which is why end users would instead just listen to pub sub or poll for the job to complete w/o a deadline. Doubling the timeout would for the most part make it more stable ... although there will be always chances of too many tests running and thus timing out.

@realjordanna So we have a kind of conflict here as we should at the same time provide a sample small enough to be understood (we do have samples using Pub/Sub but they are obviously more complicated), but at the same time, we must have a test for this sample that always passes, otherwise the continuous integration goes mad.
Having that said, I consider the sample misguiding as the comment says
      // Wait for DLP job to fully complete
      return new Promise(resolve => setTimeout(resolve(jobName), 500));

while it should actually say 'wait for 500 ms in hope that the job completes by that time'. Also, since this code might fail in CI, it might as well fail in the real users' code. Sleeping on constant timeout in hope that it's enough is evil anyway.
@ace-n and @jmdobry, do you think the risk samples can be rewritten to queue the actual job status without making them look too complicated at the same time?

These samples do in fact listened to PubSub. The problem is that the API as
it stands sends the PubSub message as the job results are written to
Spanner, not after.
TL;DR this is an eventual consistency problem.
The "correct" clientside solution to this is to use some sort of polling
(ideally exponential polling with random jitter), but not every language
will necessarily have a drop-in library for that.
We can get around this by encoding the logic in the sample itself, but that
makes the sample look even more cluttered and lengthy than it is now. (And
these samples are, IMHO, quite cluttered and lengthy due to the PubSub
logic.)
We can also avoid this by putting the appropriate logic in the client
library - which gives us a decent UX at the cost of additional maintenance
work.
Of course, the band-aid solution is to a) increase the timeout or b) fix
only the languages that have convenient exponential polling libraries.
The serverside solution is to only write to PubSub after the job is
readable (as I've suggested in the past). This is also a very user-friendly
option. (I'm not sure people want their Cloud Functions triggering on
nonexistent results, for example. This prevents that.)
On Sat, May 5, 2018, 11:05 PM Alexander Fenster<EMAIL_ADDRESS>wrote:

@realjordanna https://github.com/realjordanna So we have a kind of
conflict here as we should at the same time provide a sample small enough
to be understood (we do have samples using Pub/Sub but they are obviously
more complicated), but at the same time, we must have a test for this
sample that always passes, otherwise the continuous integration goes mad.
Having that said, I consider the sample misguiding as the comment says
  // Wait for DLP job to fully complete
  return new Promise(resolve => setTimeout(resolve(jobName), 500));

while it should actually say 'wait for 500 ms in hope that the job
completes by that time'. Also, since this code might fail in CI, it might
as well fail in the real users' code. Sleeping on constant timeout in hope
that it's enough is evil anyway.
@ace-n https://github.com/ace-n and @jmdobry
https://github.com/jmdobry, do you think the risk samples can be
rewritten to queue the actual job status without making them look too
complicated at the same time?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/googleapis/nodejs-dlp/issues/49#issuecomment-386856629,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACM8xd6DYiQIlR5AMPaohf6dJ_wM0aG5ks5tvpK-gaJpZM4Tzzbc
.

Thanks @ace-n!
I strongly believe increasing a timeout is never a solution, and I'd ask not to apply this kind of band-aid :)
I still feel there are two separate (though related) issues here, the first one being the sample sometimes not working due to eventual consistency, and the second one is the test that fails when there is no real problem. My original intent here was to concentrate on the latter one.
What do you think of marking those risk tests as skipped until we get a better idea on how to handle the polling? I can create a separate issue for that if needed.
For me right now, to have a consistently clean nightly run is a task with higher priority than to have a better test coverage, as flaky tests can mask more serious problems.

I'm happy to mark them as flaky (or skipped) - it's still a band-aid, but a more reliable one nonetheless. 😄

If customers will see this, then we should actually provide a solution.  (Ideally in either the client library or at the server side), but if it needs a work-a-round in client code, we should do this.  (Every customer shouldn't have to find this themselves)

Taking a look server side ... we did find a bug where we were publishing to pub-sub too soon. That fix should roll out tomorrow and we'll see how that impacts the flakiness. I hope it fixes it entirely.

Thanks @realjordanna! I'll wait for several days and will update the thread then.

I'll close this issue for now since I don't see this problem anymore, will reopen if it fails again. Thanks!


TypeError: 'collections.OrderedDict' object is not callable

Hey @jrosebr1 the imutils package is installed in my PC, but when I run the program I'm getting such error
Traceback (most recent call last):
File "eye_blink.py", line 24, in
(rstart, rend) = face_utils.FACIAL_LANDMARKS_IDXS("right_eye")
TypeError: 'collections.OrderedDict' object is not callable

The issue is resolved...