Question: how to make an enum-value lowercase when used as [Path] ?

I've defined this API method:
[Get("/{network}/methods")]
Task<string> GetMethodsAsync([Path] NetworkType network);

Where NetworkType is an enum defined as:
[JsonConverter(typeof(StringEnumConverter))]
public enum NetworkType
{
    [JsonProperty(PropertyName = "a")]
    A,

    [JsonProperty(PropertyName = "b")]
    B
}

When sending a request, the full url which is created by RestEase is like:
https://test.com/A/methods
instead of
https://test.com/a/methods

There's nothing built-in currently: we just call ToString on the enum value. You could use RequestQueryParamSerializer

Would it be possible that you also interpret the JsonConverter and JsonProperty annotations in a next release? So that an enum can be annotated?

Did you mean to use [EnumMember(Value = "a")] rather than [JsonProperty(PropertyName = "a")]? Json.net will ignore the latter on enum members.
I could potentially add support for serializing path parameters using json.net (this would mirror the existing functionality for query parameters, but is significantly less useful). Alternatively I could add support for DisplayAttribute.

In that case, support for [EnumMember(Value = "a")] would be the best solution.
(Adding a DisplayName attribute on an enum member is not allowed.)

I am not going to read json.net's attributes directly. That's a recipe for disaster.
So we can use DescriptionAttribute, DisplayAttribute, a custom attribute, or you can define a java-style enum like this:
public struct NetworkType
{
    private readonly string value;
    private NetworkType(string value) => this.value = value;
    public override string ToString() => this.value;

    public static NetworkType A { get; } = new NetworkType("a");
    public static NetworkType B { get; } = new NetworkType("b");
}

Your proposal with the java-style enum works fine for me now. However for the future DescriptionAttribute or DisplayAttribute would be nice if that' supported.

I'm in two minds about whether to silently start using an attribute, or whether to require the user to pass a format string.
This also applies to more than just path params: query params, query maps, properties, etc, are all effected. Some, e.g. query maps, can't have a format string specified.
If we apply it to everything, that's a lot of reflection we're suddenly introducing, as every ToString call now needs a .GetType().IsEnum check.

Then passing a format-string or a format function would be the best option.
Example 1
Task<string> GetMethodsAsync([Path, Format="..."] NetworkType network);

Example 2
Task<string> GetMethodsAsync([Path, FormatFunction=x => x.ToString().ToLower() ] NetworkType network);

That's not valid C#. You can't put lambdas in attributes.

@canton7

In that case, support for [EnumMember(Value = "a")] would be the best solution.

I am not going to read json.net's attributes directly. That's a recipe for disaster.

EnumMemberAttribute is not part of Newtonsoft.Json, it's in the .NET Framework/Core/Standard.
I'm hitting this issue as well now where I have an enum being inserted into the path but the API uses names that are not idiomatic C# (so I use EnumMember to supply the API name of the enum values).
Would it be a lot of work to add the ability to specify a serialization method for path parameters akin to QuerySerializationMethod for query parameters?
I could work around it currently by using string in the interface method and then using an extension method to supply the enum value which just serializes it or uses the EnumMemberAttribute directly, but it doesn't feel ideal.
You mentioned RequestQueryParamSerializer but from reading the docs that seems to be for query parameters only? And not as flexible as just hooking into existing serialization logic defined with Newtonsoft.Json (as QuerySerializationMethod.Serialize does).

EnumMemberAttribute is not part of Newtonsoft.Json, it's in the .NET Framework/Core/Standard.

That's a fair point.

Would it be a lot of work to add the ability to specify a serialization method for path parameters akin to QuerySerializationMethod for query parameters?

It's a little bit of handle-turning but not overly complicated - just follow the approach which has been laid down for QuerySerializationMethod.

You mentioned RequestQueryParamSerializer but from reading the docs that seems to be for query parameters only?

You're correct - looks like I confused myself.

It's a little bit of handle-turning but not overly complicated - just follow the approach which has been laid down for QuerySerializationMethod.

I'll have a look around the code I guess and see what I can figure out. Would a PR for this be welcome?

Sure, I'd happily accept a PR which does this. I'm happy to look at it myself, but I'm afraid it might be a week or so until I get time.

I've added some code in a fork to test this, but running into some code generation problems.
Unit tests for the path properties are throwing InvalidProgramException, the only change I've done in the code generation is to emit a new int value for the path serialization enum.
Comparing the emit calls to the one for query properties, I don't see any major differences, but I don't have much experience in IL code generation so. Do you have any ideas?
I also realized something while implementing this: A custom object that is serialized into a JSON string with the default json.net serializer would appear as "value" in the URL path, which is probably not what is desired.
The same happens when serializing a query parameter though. So I guess that should be handled by the consumer defining a custom serializer to handle that.

I think the issue is that you've changed the signatures for both AddPathProperty and AddPathParameter, but only updated the IL for AddPathProperty. That means it's probably falling over when it's trying to call AddPathParameter, since the serialization method isn't on the stack?
I'm not sure that having a JSON serializer for path parameters makes sense. For query parameters, sure, I've genuinely seen APIs which put url-encoded JSON there. But I've never seen that for a path.
I'm inclined to think that we should provide a serializer which just looks at EnumMemberAttribute / DisplayAttribute, but I'm in two minds as to whether it should be set by default. The problem here is backwards compatibility - once someone's opted into a particular serializer, we can't change it without breaking it. That means we can't add any functionality to a serializer after it's shipped, and we can't change what the default serializer is either. I don't want to get locked into a situation where we ship a default serializer that it turns out isn't quite what people want, and we can't change the serializer, or change to another default serializer.

Adding an EnumMemberSerializer would maybe be optimal yeah. It shouldn't need to be set as the default, it could default to ToString behaviour just like query parameter serialization does? And if Serialized is specified it will use the EnumMemberAttribute serializer, or a custom one if overridden in the RestClient properties.

Even setting the EnumMemberSerializer as the default serializer at all is a worry (even granted that the user has to change the serialization method). My concern is that, if we find out that EnumMemberSerializer is imperfect and we need to create a better version, we can't set the better version as the default serializer without breaking people.
I think I'd rather leave the default as null (so people get an exception if they try and seralizer without a serializer set), and document the steps people need to do to use the EnumMemberSerializer. To be honest, "use a couple of attributes on enums" feels like a weird default way to serialize path parameters as a whole (which can be any data type).

Honestly, as long as I can set a serializer in some way, I'm happy :)
Whether Serialized will default to something or be null and require setting a value manually, it will work for my usecase.
And as you say, it could be weird to automatically make Serialized use something that is intended for enums (unless it also looks at DisplayAttribute? but still pretty situational).

Implemented, thanks @Sharparam!


Multi line tree

Adding ReadMultiLineTree to both tree.go and expandedTree.go. Processes the multi line tree with \n into a single line tree that can be read as normal by ReadNewick. EDIT: function was useful for any file type, so it's been moved to fileio and that is now called for the tree and expandedTree packages to read a multi-line tree.

We have to deal with a few merging conflicts but otherwise LGTM!

Conflict with tree.go has yet to be resolved.


apply/create - local-source-proxy.apps.tanzu.vmware.com isn't being removed when included in workload.yaml AND --source-image flag/value is included

Please fill out the issue checklist below and provide ALL the requested information.

[x] I reviewed open and closed Github issues that may be related to my problem.
[x] I am reporting a bug that others will be able to reproduce.

Describe the bug
apply/create - local-source-proxy.apps.tanzu.vmware.com isn't being removed when included in workload.yaml AND --source-image flag/value is included
Expected behavior
local-source-proxy.apps.tanzu.vmware.com should be removed
Steps to Reproduce
tanzu apps workload create/apply -f workload.yaml --source-image gcr.io/my-playground/lsp
apiVersion: carto.run/v1alpha1
kind: Workload
metadata:
  name: tanzu-java-web-app
  labels:
    apps.tanzu.vmware.com/workload-type: web
    app.kubernetes.io/part-of: tanzu-java-web-app
    apps.tanzu.vmware.com/has-tests: "true"
  annotations:
    local-source-proxy.apps.tanzu.vmware.com: my-value
spec:
  params:
    - name: annotations
      value:
        autoscaling.knative.dev/minScale: "1"
  source:
    git:
      url: https://github.com/sample-accelerators/tanzu-java-web-app
      ref:
        branch: main

this will result in a workload object being submitted which includes the annotation.
Update the apps plugin so the annotation is removed as expected.

After discussin more about this issue, the decision is to extend the fix for whenever the LSP annotation comes in a file.
Comment from @heyjcollins:

The local-source-proxy.apps.tanzu.vmware.com annotation when included in the workload.yaml should be removed in all cases except if/when a user passes in --local-path (and doesn't include --source-image).


chungnguyen.crfnetwork.cyou

Subdomain (required): chungnguyen.crfnetwork.cyou

Owner (required): https://github.com/chungngx/

Project (optinal): https://github.com//

Contact infor (required<EMAIL_ADDRESS>

Additional (optinal): Add any message or screenshots if you want to request here.

SUCCESSFUL: :heavy_check_mark:
Your domain name has been approved with the cname record chungnguyen.github.io -> chungngx.crfnetwork.cyou.

Check out the Issue #51


Update view-service-health.md

Corrected service administrator role to Service support admin

@JohanFreelancer9 Please copy review

Issue#https://github.com/MicrosoftDocs/microsoft-365-docs/issues/4579


devpod: 0.5.19 -> 0.5.20

Automatic update generated by nixpkgs-update tools. This update was made based on information from https://github.com/loft-sh/devpod/releases.
meta.description for devpod is: Codespaces but open-source, client-only and unopinionated: Works with any IDE and lets you use any cloud, kubernetes or just localhost docker
meta.homepage for devpod is: https://devpod.sh
Updates performed

Golang update

To inspect upstream changes

Release on GitHub

Compare changes on GitHub

Impact
Checks done

built on NixOS
The tests defined in passthru.tests, if any, passed
found 0.5.20 with grep in /nix/store/9kpkykv831d4qr4g0cpgrnf3vkd5p9nr-devpod-0.5.20
found 0.5.20 in filename of file in /nix/store/9kpkykv831d4qr4g0cpgrnf3vkd5p9nr-devpod-0.5.20

Rebuild report (if merged into master) (click to expand)

3 total rebuild path(s)

3 package rebuild(s)

First fifty rebuilds by attrpath

devpod
devpod-desktop

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/9kpkykv831d4qr4g0cpgrnf3vkd5p9nr-devpod-0.5.20 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A devpod https://github.com/r-ryantm/nixpkgs/archive/07b4ece5c88c5cd45533a57c83c5fe8ad600a5ce.tar.gz

Or:
nix build github:r-ryantm/nixpkgs/07b4ece5c88c5cd45533a57c83c5fe8ad600a5ce#devpod

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/9kpkykv831d4qr4g0cpgrnf3vkd5p9nr-devpod-0.5.20
ls -la /nix/store/9kpkykv831d4qr4g0cpgrnf3vkd5p9nr-devpod-0.5.20/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

1 package failed to build:

devpod-desktop

1 package built:

devpod

Maintainer pings
cc @maxbrunet for testing.

[!TIP]
As a maintainer, if your package is located under pkgs/by-name/*, you can comment @NixOS/nixpkgs-merge-bot merge to automatically merge this update using the nixpkgs-merge-bot.

Add a :+1: reaction to pull requests you find important.

Oh wait, fetchYarnDeps hash is not updated.


typescript-react-query plugin should expose document for hooks

Is your feature request related to a problem? Please describe.
In typescript-react-query plugin there's an option to expose query keys for hooks. I'd like to expose document as well to make writing custom hooks easier. Example:
interface UseQueryFn<
  TData extends Record<string, any>,
  TVariables extends Record<string, any>
> {
  (variables: TVariables, options?: UseQueryOptions<TData>): unknown
  getKey: (variables: TVariables) => unknown[]
  document: string // this what I want to expose
}

function useFetchGraphQLQuery<
  TData extends Record<string, any>,
  TVariables extends Record<string, any>
>(
  useQuery: UseQueryFn<TData, TVariables>,
): (variables: TVariables, options?: FetchQueryOptions<TData, Error>) => Promise<TData> {
  const queryClient = useQueryClient()

  return useCallback(
    (variables, options) =>
      queryClient.fetchQuery(
        useQuery.getKey(variables),
        () => gqlRequest<TData, TVariables>(useQuery.document, variables),
        options,
    ),
    [useQuery, queryClient],
  )
}

// Then using it like this:

const getUser = useFetchGraphQLQuery(useGetUser)

async function onClick() {
  const user = await getUser({ id: 1 })
}

Describe the solution you'd like
I'd like to add an option exposeDocument. Created PR: https://github.com/dotansimha/graphql-code-generator/pull/5863

There are other plugins that expose documents like typed-document-node. I am not sure if this is the case of this plugin.

@ardatan  Yes, document node is already exposed but it's not tied to a particular hook, so right now I how to write:
function useFetchGraphQLQuery<
  TData extends Record<string, any>,
  TVariables extends Record<string, any>
>(
  useQuery: UseQueryFn<TData, TVariables>,
  query: string
): (variables: TVariables, options?: FetchQueryOptions<TData, Error>) => Promise<TData> {
  const queryClient = useQueryClient()

  return useCallback(
    (variables, options) =>
      queryClient.fetchQuery(
        useQuery.getKey(variables),
        () => gqlRequest<TData, TVariables>(query, variables),
        options,
    ),
    [useQuery, query, queryClient],
  )
}

const getUser = useFetchGraphQLQuery(useGetUser, GetUserDocument)

It requires more attention and can be error prone

@lynxtaa So you can use TypedDocumentNode plugin to generate TypedDocumentNode and the signature can be like below;
function useFetchGraphQLQuery<
  TData extends Record<string, any>,
  TVariables extends Record<string, any>
>(
  useQuery: UseQueryFn<TData, TVariables>,
  query: TypedDocumentNode<TData, TVariables>
)

So you can make sure the document is correct thanks to TypedDocumentNode

I didn't know about TypedDocumentNode and it looks really neat, thank you! But I think it'll be much easier from the development perspective to infer a query from a passed hook:

Requires passing less arguments to custom hooks
No need to install typed-document-node
No need to generate TypedDocumentNode for each query since it's much more rare usage cases like queryClient.fetchQuery, queryClient.prefetchQuery
Now I have to stringify DocumentNode to make a request

It seems to be an overkill it my case. It's a small addition to a plugin and it'll be very useful

Also I've experimented with typed-document-node with typescript-react-query and it produces clashing exports:

My config is:
overwrite: true
schema: 'https://rickandmortyapi.com/graphql'
documents: '{hooks,lib,pages}/**/*.{ts,tsx,graphql}'
generates:
  lib/graphql-queries.ts:
    plugins:
      - typescript
      - typescript-operations
      - typed-document-node
      - typescript-react-query
    config:
      errorType: Error
      skipTypename: true
      exposeQueryKeys: true
      avoidOptionals:
        field: true
        inputValue: false
        object: false
        defaultValue: false
      fetcher:
        func: './gqlFetcher#gqlFetcher'
        isReactHook: false

Am I missing something?

Available in<EMAIL_ADDRESS>

@dotansimha Thanks! Can you look at the https://github.com/dotansimha/graphql-code-generator/issues/5862#issuecomment-821966143 ? Should I move it to the separate issue or maybe I'm missing something in my config?

@lynxtaa yes please do, thank you so much for your help!


Request to join CrowdStrike GitHub Organization

Hello -- requesting access to the CrowdStrike GitHub Organization. Please find my CS details below:
e-mail<EMAIL_ADDRESS>slack: @musa

Hey @musayev-io ! Just returning from PTO. Added!


Add test case to verify that it's possible to add a column of array(geo_shape)

Add test case to verify that it's possible to add a column of array(geo_shape) type
Follow up to https://github.com/crate/crate/commit/fe5f867ca94497a6f7f1cb0ee29dd42d6775ddbe
Will port manually to 5.2 with cherry-pick of the referenced commit and release notes since it's actually a user facing issue.
Spot it when migrating CREATE TABLE to use List<Reference>
FulltextIntegrationTest.testCopyValuesFromStringArrayToIndex started to fail and I recalled that we had such fix for GeoReference.

Hi @mfussenegger, there is similar problem with IndexReference. I'm going to create a separate PR for that, however, release notes for geo/text will be almost identical - should be fine?

test_types_with_storage_can_be_inserted_and_queried

it explicitly skips geo types with
 if (type.equals(DataTypes.GEO_POINT)) {
     // source and doc-value values don't match exactly
    continue;
}

not sure it's a good fit as here we want to check exactly geo type.
DocIndexMetadataTest.getDocIndexMetadataFromStatement is dedicated to CreateTableStatement is we still have there version which returns mapping after analysis, hence can do smth like  .putMapping(new MappingMetadata(analyzedStatement.mapping()))
I started to adapt DocIndexMetadataTest.getDocIndexMetadataFromStatement to work with ADD COLUMN as well but we don't have mapping there anymore, we do it in transport. I can create AddColumnRequest and create a mapping out of it but it would not a "fair test" since I will be testing not a real component but sone artificial hybrid.

DocIndexMetadataTest relies on mapping being available on analysis phase already, which is not the case for ADD COLUMN and won't be the case for CREATE TABLE on 5.5 (or later, depending when we decide to remove BWC code).
I will try to re-write this as a AddColumnTaskTest unit test

Porting it to 5.3 as well since I'm already porting it manually to 5.2 in https://github.com/crate/crate/pull/13978

DocIndexMetadataTest relies on mapping being available on analysis phase already, which is not the case for ADD COLUMN and won't be the case for CREATE TABLE on 5.5 (or later, depending when we decide to remove BWC code).

We'll still want a way to write CREATE TABLE sql statements and to then assert properties on the DocTableInfo/References.

We'll still want a way to write CREATE TABLE sql statements and to then assert properties on the DocTableInfo/References.

There was a discussion on anothr PR that we will migrate mapping creation code to the new code path
See https://github.com/crate/crate/pull/13934#discussion_r1172538059 and https://github.com/crate/crate/pull/13934#discussion_r1172562983
I migrated tests so that we can assert properties in unit tests to the new mapping creation code in https://github.com/crate/crate/pull/13934/commits/d59e5f3db3d176b4bb51cbe76e9eefbfb8479e9c


Ship MIT license into v8 release

❤

Coverage increased (+0.03%) to 72.257% when pulling 2176d573199ffb7ea933f879706dfe93522df5ef on develop into 35ca4ad3c44c4f0aa87b66434e3d4b898dd9c419 on master.


Update .vscode/settings.json to always point to local typescript instance installed with the project

Category

[ ] Question
[ ] Typo
[ ] Bug
[x] Enhancement / Suggestion
[ ] Additional article idea

Expected or Desired Behavior
Given that SPFx project has its own version of TypeScript installed, it would be better if the .vscode/settings.json file contained a reference to it by default.
Observed Behavior
When opening Visual Studio Code developer is prompted about the difference in version of TypeScript provided with VSCode and used by the project.
Steps to Reproduce

create new SPFx project
open project in VSCode

@nickpape-msft  - Is this something you can handle?

We added a reference to the version of Typescript at the root of the node_modules folder. This will be included in the next release.


[WIP] Improving plots so that optimizer results from BayesSearchCV can be plotet

Extend example with plot
Add constant property to dimension
Skip Constant dimensions in plot_objective
Try to fix issue #566

Hello @holgern! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:

In the file examples/sklearn-gridsearchcv-replacement.py:

Line 39:1: E402 module level import not at top of file
Line 130:1: E402 module level import not at top of file

In the file skopt/plots.py:

Line 557:80: E501 line too long (83 > 79 characters)
Line 567:39: E128 continuation line under-indented for visual indent


Bump + Refactor

Bumped dependency versions:

pnet: 0.31 -> 0.34
nu-plugins: 0.85.0 -> 0.87.0
nu-protocol: 0.85.0 -> 0.87.0

Refactor:

replaced structs with standard constructors

This looks good to me! This changes enough that I'm going to bump the version to 1.3.0. I've credited you in the changelog at the bottom of the README. Thank you for your contributions!


Update resource tests

Fix: https://github.com/Azure/azure-cli/issues/3890

This checklist is used to make sure that common guidelines for a pull request are followed.
General Guidelines

[ ] The PR has modified HISTORY.rst with an appropriate description of the change (see Modifying change log).

Command Guidelines

[ ] Each command and parameter has a meaningful description.
[ ] Each new command has a test.

(see Authoring Command Modules)

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@6800c4d). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master    #3976   +/-   ##
=========================================
  Coverage          ?   70.67%
=========================================
  Files             ?      427
  Lines             ?    27452
  Branches          ?     4190
=========================================
  Hits              ?    19402
  Misses            ?     6802
  Partials          ?     1248

Continue to review full report at Codecov.

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


Can't able to test handleClick function to update the state

Were you able to figure this out?

@ljharb - Yes by using dive(). Thanks


Firewall/WAF (t-shirt)

Firewall/WAF (DPP) (M)
T-Shirt estimate was made on 05/31/19.

S: < 1 pair / .5 sprint
M: 1 pair / 1 sprint
L: 2 pairs / 1 sprint
XL: way >

07-02-2019 Migrated from SMRT-1327

@rob-h-m
This is specific to Columbus and should move to SmartColumbusOS


Implement ArbitaryOrd for absolute::LockTime

At times we would like to provide types that do not implement PartialOrd and Ord because it does not make sense. I.e we do not want users writing a < b. This could range from kind-of-iffy to down-right-buggy (like comparing absolute locktimes).
However this decision effects downstream users who may not care about what the ordering means they just need to use it for some other reason e.g., to use as part of a key for a BTreeMap (as we do in miniscript requiring the AbsLockTime type).
A solution to this problem is to provide a wrapper data type that adds PartialOrd and Ord implementations. I wrote the ordered crate is for this very purpose.

I'm not 100% sure that I have the correct set of traits implemented on Ordered, would love feedback please.

I like this. Not saying I'm certain it's the correct approach but feels good.

This PR is coupled with #2207

I'm a little surprised CI doesn't see this.

I'm very surprised, I'll investigate.

I think granting access to upload the crate to Andrew should be required to improve the bus factor.

Sure thing, we can move it to the rust-bitcoin org too, if hex-conservative lives in rust-bitcoin then this crate should too, right?  I can add you guys as maintainers also, if you want that burden.

I'm fine with moving it to the org even though I'm not sure if my opinion on this is relevant. :)
Also you can make me a co-maintainer but I expect my role will be mainly to deal with emergencies.

I'm fine with moving it to the org even though I'm not sure if my opinion on this is relevant. :)

Your opinion is relevant :).
Agreed, let's move it to the org.

Coolio. I'm guessing you make the repo in the org @apoelstra and I'll PR in the code? Then I can archive it in its current home.

That would mean you have to configure the maintainers too.

@tcharding you can probably move the repo, since you're a member of this org.
If not, you can make me an admin of the repo and I can do the move.

Moved! Please watch the new repo and check out the trivial PR I raised, mentions the repository link on crates.io

Made the dependency optional and feature gated the impl.

@apoelstra has to accept the invite I'd say, see https://github.com/rust-bitcoin/rust-ordered/pull/11

Probably easier to wait for ordered 0.2.0 before merging this one.

Looks good, though I still only see you as the only owner on crates.io.

This is fixed now https://crates.io/crates/ordered

Ready to be considered for merge please.

Can you update the lockfiles for the new dep?

Can do, I wonder why CI is not failing then, thinking out loud, I'll look into it.

Oh that's right, we only warn in CI if the lock files are stale don't we. Fixed now.

Oh that's right, we only warn in CI if the lock files are stale don't we. Fixed now.

We warn if they're "stale" in the sense that it's possible to upgrade them (though we don't check whether the "possible" upgrades would violate our MSRV policy, which they definitely will, so the warnings are useless, but whatever). But we should also do a hard check whether it's actually possible to build the project with them. And in this case it wasn't.

But we should also do a hard check whether it's actually possible to build the project with them.

Yes, we were not using --locked in the sanity builds/tests, fixed: https://github.com/rust-bitcoin/rust-bitcoin/pull/2327


chromedp v0.10.0 with amd64 latest chrome causes deadline exceeded

What versions are you running?
Chromedp v0.10.0
Hey I'm using chromedp with chromium on AWS Lambda.
arm64 (debian latest - chrome 126.*) everything works well,
but on amd64 chrome (127.0.6533.99) I get context deadline exceeded error when I run chromedp.RunResponse(ctx, actions...).

Code works fine with previous chromium versions on each arch

This is the last debug log - after this it gets stuck
{\"id\":3,\"sessionId\":\"AA37AF6627E83F546FF4D68123ED353C\",\"method\":\"Runtime.enable\"}

Hi i would really appreciate some help here. randomy it gets stuck on runtime.enabled and doesn't get any response

Same problem here

I use Rocky Linux on Raspberry PI 4 8GB, inside docker, using Chromium and this solved my problem
allocOptions := append(
		chromedp.DefaultExecAllocatorOptions[:],
		chromedp.DisableGPU,
		chromedp.Headless,
	)

	aCTX, aCancelar := chromedp.NewExecAllocator(context.Background(), allocOptions...)
	defer aCancelar()

	ctx, cpdCancelar := chromedp.NewContext(aCTX)
	defer cpdCancelar()

Still happens for me with those flags (they are the same as I used before)

This is the last debug log - after this it gets stuck
{\"id\":3,\"sessionId\":\"AA37AF6627E83F546FF4D68123ED353C\",\"method\":\"Runtime.enable\"}

In case you haven't already, you may include the following in the allocator options to help debug by capturing any errors from the browser happening after that log message:
chromedp.CombinedOutput(os.Stdout),

Here are the Chrome logs. I understand the DBus error might not be related, but I’m concerned the virtualization error could be significant:
prctl(PR_SET_NO_NEW_PRIVS) failed prctl(PR_SET_NO_NEW_PRIVS) failed
[0818/153928.488373:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[0818/153928.489558:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket: No such file or directory
[0818/153928.489640:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /run/dbus/system_bus_socket
[0818/153915.566510:ERROR:gpu_channel_manager.cc(953)] Failed to create GLES3 context, fallback to GLES2.
[0818/153915.566537:ERROR:gpu_channel_manager.cc(964)] ContextResult::kFatalFailure: Failed to create shared context for virtualization.
[0818/153915.566542:ERROR:raster_command_buffer_stub.cc(88)] ContextResult::kFatalFailure: Failed to create raster decoder state.

My test cases are failing with context timeout's on Alpine v3.20.  3.19.4 works fine.  I was able to work around this issue with chromedp.Flag("headless", false) and simulate an X server with xvfb:
Xvfb :99 &
export DISPLAY=:99
# Now run chromedp

Here are the logs of what happens when I run chromedp in headless mode:
logs.txt


Include typings in build

I made an oversight in my previous PR - src/index.d.ts is not included in the build that is published to NPM. This should fix that :)

Thanks again!

Now also thanked officially :-) https://github.com/GoogleChromeLabs/browser-nativefs/commit/bc3732b58577f7ad2db046f5d3ab1beb7dce2d68


PROB-925: update condition to check nvme_device presence

[Risk Level label][1]
JIRA

Main JIRA ticket

Code reviewers

[ ] @pallav-jakhotiya
[ ] @pkazi
[ ] @Ramesh7

Summary of issue
The re-assembling for raid device was failing as the if condition was always returning the first nvme device
Summary of change
Update the if condition to check the data read from nvme_device
Testing approach

[x] Manual

Closing as duplicate of https://github.com/coupa-ops/aws/pull/15


Add long pulling support for getUpdates() method

It is very handy sometimes to use long pooling instead of webhook.
Telegram documentation states that it is ok to use getUpdates() method.
This PR adds two parameters to updates() method: offset and timeout, so one can use them to implement long pooling.
This PR does not introduce any BC.

The only thing is, right now it is not possible to set Guzzle timeout when making request, and if timeout parameter is greater than 30 seconds (default guzzle timeout) it will fail.
Anyway, using 20 seconds timeout for pooling is ok.

@zim32 thanks for your contribution!
what prevents you to increase Guzzle timeout?

Oh, BC here. Offset parameter is not optional. I can fix this

I made offset optional. BC should be fixed now

@zim32 thanks for your contribution!
what prevents you to increase Guzzle timeout?

I just don't know how to pass timeout to guzzle client used by this library

@zim32 I'll take a look on this 😉

@zim32 done
would you mind adding tests and updating the docs?

@zim32 done
would you mind adding tests and updating the docs?

I will. Into this PR?

yep, you can add it to this PR so we keep things together

closing this as it is inactive
@zim32 feel free to bump me if you want to keep working on it


Haskell: unable to decommit memory: Invalid argument"

Issue description
ghc-pkg: unable to decommit memory: Invalid argument
ghc-pkg: unable to decommit memory: Invalid argument
Warning: haddock-interfaces: /nix/store/wl28b2dpilqqriwvq9x06g9l6vmgrpmm-network-interfacerequest-0.0.2/share/doc/x86_64-linux-ghc-8.0.1/network-interfacerequest-0.0.3/html/network-interfacerequest.haddock doesn't exist or isn't a file
Warning: haddock-html: /nix/store/wl28b2dpilqqriwvq9x06g9l6vmgrpmm-network-interfacerequest-0.0.2/share/doc/x86_64-linux-ghc-8.0.1/network-interfacerequest-0.0.3/html doesn't exist or isn't a directory
ghc-pkg: unable to decommit memory: Invalid argument
Warning: The package list for 'hackage.haskell.org' does not exist. Run 'cabal
update' to download it.
Resolving dependencies...
Configuring tunder-<IP_ADDRESS>...
cabal: unable to decommit memory: Invalid argument
Steps to reproduce
Technical details

System: (NixOS: nixos-version, Ubuntu/Fedora: lsb_release -a, ...)
Nix version: (run nix-env --version)
Nixpkgs version: (run nix-instantiate --eval '<nixpkgs>' -A lib.nixpkgsVersion)

dupes https://github.com/NixOS/nixpkgs/issues/18118


moduleGraph.invalidateModule() softInvalidate can be optimizing

Describe the bug
in sourcecode, importer's softInvalidate state are defined by importer.staticImportedUrls or current softInvalidate
mod.importers.forEach((importer) => {
  if (!importer.acceptedHmrDeps.has(mod)) {
    // If the importer statically imports the current module, we can soft-invalidate the importer
    // to only update the import timestamps. If it's not statically imported, e.g. watched/glob file,
    // we can only soft invalidate if the current module was also soft-invalidated. A soft-invalidation
    // doesn't need to trigger a re-load and re-transform of the importer.
    const shouldSoftInvalidateImporter =
      importer.staticImportedUrls?.has(mod.url) || softInvalidate
    this.invalidateModule(
      importer,
      seen,
      timestamp,
      isHmr,
      shouldSoftInvalidateImporter,
    )
  }
})

but it fails sometimes, in next case app.vue imports a.ts

<template>
  {{ arr }}

hmr fails

</template>

after first init vite program, app.vue moduleNode's staticImportedUrls containsa.ts(like /src/a.ts), when i change a.ts, it match a.ts moduleNode's url, so app.vue will softInvalidate itself, this is ok.
but after change app.vue, app.vue will load and transform its content, its moduleNode's staticImportedUrls contains a.ts with timestamps(like /src/a.ts?v=xxx), so next time i just change a.ts, importer.staticImportedUrls?.has(mod.url) will be false, app.vue will never softInvalidate itself.
Reproduction
https://github.com/YellRes/soft-invalidate-fail
Steps to reproduce
run pnpm run dev

change content in app.vue
then change content in a.ts
app.vue isn't softInvalidate

System Info
System:
    OS: macOS 13.2
    CPU: (8) arm64 Apple M1
    Memory: 1.18 GB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 16.14.2 - /usr/local/bin/node
    npm: 8.3.0 - ~/node_modules/.bin/npm
  Browsers:
    Chrome: 120.0.6099.216
    Edge: 120.0.2210.133
    Safari: 16.3
  npmPackages:
    @vitejs/plugin-vue: ^4.5.2 => 4.6.2
    vite: ^5.0.8 => 5.0.11

Used Package Manager
pnpm
Logs
No response
Validations

[X] Follow our Code of Conduct
[X] Read the Contributing Guidelines.
[X] Read the docs.
[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[X] Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
[X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
[X] The provided reproduction is a minimal reproducible example of the bug.

Thanks for digging into this! Seems clear that this is a bug. I think on this line https://github.com/vitejs/vite/blob/9d0c7e0b1f40ce219c7c3203994515af4c292bcb/packages/vite/src/node/plugins/importAnalysis.ts#L688
we can map and run through removeTimestampQuery() to strip the timestamps away. Would you like to contribute a fix for this?

sure, i will try this

@bluwy sry, i never contribute before. after sever times pr failed, maybe other people are better do this😥

No problem! Feel free to hop in to the Vite discord server if you need help setting Vite up locally, otherwise others may also help contribute a fix.


feat: GitHub action for sprocket check and lint

Add a GitHub Action to wrap Sprocket and enable easy use of the check and lint options in GitHub CI/CD workflows.

LGTM, but is there a way for me to actually run it on an example repo?

I believe once it is merged into main that we can point to it from a workflow. I'm still digging into the docs, but that's my impression so far.

Shouldn't it have a version declared somewhere?

Shouldn't it have a version declared somewhere?

Versions get managed through branches and tags (https://docs.github.com/en/actions/sharing-automations/creating-actions/about-custom-actions#using-tags-for-release-management. Something like release/v1 as a branch would enable action@v1 and then you'd tag specific versions off of that branch (e.g. 1.0.0, 1.1.0, etc.).


Request: Could you add featured progress bar Value ?

Hello, thank you for sharing very nice lib. I very liked your lib but what I stuck right now I can not add value to progress bar. thanks

@khanxc

Hi @kristoff2016
You can find the animateScale in IBInspectable property. Enter the animateScale value from 0 to 1.

Hi, I knew it but your lib animateScale value from 0 to 1 just load only when viewDidload. it is not possible to make it update during my song playing for update this animateScale


When extracting PDF To XML, Last  tag omitted

When converting the attached pdf file to xml using below code, there should be a  tag at the end. That tag is omitted.
resource_mgr = PDFResourceManager()
retstr = BytesIO()
codec = 'utf-8'
laparams = LAParams()
device = XMLConverter(resource_mgr, retstr, codec=codec, laparams=laparams)
maxpages = 0
caching = True
pagenos=set()
infile_pdf_fp = file(downloaded_pdf_file, 'rb')
interpreter = PDFPageInterpreter(resource_mgr, device)
for page in PDFPage.get_pages(infile_pdf_fp, pagenos, maxpages=maxpages, password='', caching=caching, check_extractable=True):
    interpreter.process_page(page)

data = retstr.getvalue()
device.close()
retstr.close()`

pdf.pdf
Last 5 lines of extracted xml:
</textgroup> </textgroup> </textgroup> </layout> </page>
This is happening with every single PDF. Problem doesn't show up when using pdf2txt.py

I am facing the same issue with pdfminer. For small size pdfs it works well.
I tried to parse etree it gives the tag missing error.
lxml.etree.XMLSyntaxError: Premature end of data in tag pages line 2, line 1594542, column 1


Usage example with use-torch-light lib

I would appreciate a usage example of react-qr-reader v5.0.0 with https://github.com/BlackBoxVision/use-torch-light
The one that posted in the doc seems outdated and not compatible with the new QrReader API

Same think my side.


Downgrades are being proposed

There seems to be something off with resolving the actual version changes:
Found new version for "actions/checkout"
  Updating "actions/checkout@v3" with<EMAIL_ADDRESS>  Found new version for "saadmk11/github-actions-version-updater"
  Updating "saadmk11/github-actions-version-updater@main" with<EMAIL_ADDRESS>  Found new version for "actions/setup-python"
  Updating "actions/setup-python@v4" with<EMAIL_ADDRESS>
The specific issues I see here:

v2.5.0 is considered more recent than version v3 for actions/checkout.
v0.5.6 is considered more recent than main, although main references the latest unreleased code from the default branch.
v4.3.0 is being proposed for the short syntax v4, although I would assume that v4 will always use the latest release of the v4 major version (currently being v4.3.0 for actions/setup-python). I am not sure about this though, as I could not find any information on which version is being picked by GitHub Actions in this case.

Hi @FriedrichFroebel, Thanks for reporting this issue.

v2.5.0 is considered more recent than version v3 for actions/checkout.

This is a known problem. This is happening because this action uses GitHub's Latest Release API which returns the Latest Release Published by the repository, which sometimes may not be the latest version available for the action (e.g: if the repository is maintaining multiple versions at the same time v2.x, v3.x and a new version of v2.x is released)

v0.5.6 is considered more recent than main, although main references the latest unreleased code from the default branch.

The Action Currently Supports Tags Only (will support commit SHA (from default branch or latest release Tag) in the near future. https://github.com/saadmk11/github-actions-version-updater/pull/19). There is no plan for suggesting branches.

v4.3.0 is being proposed for the short syntax v4, although I would assume that v4 will always use the latest release of the v4 major version (currently being v4.3.0 for actions/setup-python). I am not sure about this though, as I could not find any information on which version is being picked by GitHub Actions in this case.

This behavior is intentional. This Action will not suggest moving versions rather it will suggest specific versions.

Thanks for the explanations. In my opinion, these limits should be mentioned somewhere in the docs as well, as otherwise one will just stumble upon them when actually trying to use them.

v2.5.0 is considered more recent than version v3 for actions/checkout.

This is a known problem. This is happening because this action uses GitHub's Latest Release API which returns the Latest Release Published by the repository, which sometimes may not be the latest version available for the action (e.g: if the repository is maintaining multiple versions at the same time v2.x, v3.x and a new version of v2.x is released)

Fixed on https://github.com/saadmk11/github-actions-version-updater/pull/19

Awesome, thanks a lot :)


Feature/nam ns basic security with jwt

Implement Spring Security, basic Authentication (auth using information in Database)
Add Role, Permission
Implement JWT
Update Swagger config to allow passing JWT to Authorization header
Implement Register user (not correct, must update later)
Login using GET please, cannot get data in POST body, which is so sad for me

TODO: cleanup code, write comment

ủa méo có nút close à


cluster: race condition in raft/cluster

Describe the bug
The raft/cluster package has a message queue channel which passes on the incoming messages through it like this:
c.messages <- incomingPayload{
			origin:  conn,
			payload: data,
		}

This channel when closed asynchronously from its parent function leads to a race condition.
To Reproduce
Reproduced while cluster.Close() is called, in the raft branch.
Expected behavior
Race conditions must not exist, ever!
Screenshots

Solved using a select in the sending phase. Check for a close signal and close if that exists, else send the messages.


[Bug]: Incompatible with speechbrain: Segmentation fault

System Info
Describe the bug
I want to use LoRa tuning to fine-tune Whisper, but after I installed peft (parameter-efficient finetuning), it comes to a segmentation fault for each speechbrain process (even I didn't import it).
I uninstalled peft, and the code runs normally again.
I have no idea whether this bug derives from Speechbrain or peft, is there anyone meets the same bug?
Who can help?
No response
Information

[ ] The official example scripts
[X] My own modified scripts

Tasks

[ ] An officially supported task in the examples folder
[X] My own task or dataset (give details below)

Reproduction
import speechbrain as sb
from peft import LoraConfig, get_peft_model

Versions
speechbrain version is 0.5.14
peft version: I tried 0.2.0, 0.4.0, and both of them do not work.
Relevant log output
Segmentation fault (core dumped)

Expected behavior
I expected I could import speechbrain and peft simultaneously.

Does it importing just peft work? or does the issue only come up when when trying to import both simultaneously?

Importing only peft or speechbrain works normally. It happens when we import them simultaneously.

It has something to do with your installation of Speechbrain. I tried reproducing the error in Colab notebook they provide in tutorial section, but it all worked normally.
Make sure you have all the dependencies installed.

Could you provide the dependencies and their versions for me plz. I will compare and check my environment.

Requirements.txt will be perfectly fine if you could.

Here
or alternatively this should do the trick
!git clone https://github.com/speechbrain/speechbrain/
%cd /content/speechbrain/
!pip install -r requirements.txt
!pip install -e

Thank you for your prompt reply. But it seems not have peft installed. Could you send me the complete dependence's or the peft version please?


Surrogate ML model update

The surrogate model can be now updated at runtime when a RabbitMQ message following this template is received by AMSlib:
UPDATE:/surrogate/ml/path

The message has to be sent on the exchange and routing key specified in the JSON config.
{
  "db" : {
    "dbType" : "rmq",
      "rmq_config" : {
        "rabbitmq-name": "",
        "rabbitmq-password": "",
        "rabbitmq-user": "",
        "rabbitmq-vhost": "",
        "service-port": 0,
        "service-host": "",
        "rabbitmq-cert": "",
        "rabbitmq-outbound-queue": "",
        "rabbitmq-exchange": "",
        "rabbitmq-routing-key": ""
    }
  },
  "ml_models" : {
  }
}

Note that rabbitmq-inbound-queue has been deprecated and is now replaced by rabbitmq-exchange and rabbitmq-routing-key.

@koparasy I have addressed your comments, let me know when you want to discuss.


Simple way to cancel submitted batches

With the default (parallel) backend you can just CTL+C to stop the process of submitting requests.
Because batches are submitted at the start and just monitored, if you want to cancel you need to specifically send a cancel signal to the API.
This would be helpful if the user (for example) meant to truncate an input dataset and sent 100M requests instead of 1M. Or realized that they made an error (maybe by looking at the visualizer) and want to prematurely cancel a large batch to not waste the $ on a run they know won't be what they want.

Example scripts cancel_batches.py
import argparse
import json
from openai import OpenAI

# python cancel_batches.py --batch_objects_file ~/.cache/curator/005462827e59fa42/batch_objects.jsonl

def parse_args():
    parser = argparse.ArgumentParser(description='Cancel OpenAI batches from a JSONL file')
    parser.add_argument('--batch_objects_file', type=str, help='Path to the JSONL file containing batch objects')
    return parser.parse_args()

def cancel_batches(batch_objects_file):
    # Initialize OpenAI client
    client = OpenAI()

    # Keep track of successes and failures
    cancelled = []
    failed = []

    # Read and process the JSONL file
    with open(batch_objects_file, 'r') as f:
        for line in f:
            batch_obj = json.loads(line.strip())
            batch_id = batch_obj['id']

            try:
                client.batches.cancel(batch_id)
                cancelled.append(batch_id)
                print(f"Successfully cancelled batch: {batch_id}")
            except Exception as e:
                failed.append((batch_id, str(e)))
                print(f"Failed to cancel batch {batch_id}: {str(e)}")

    # Print summary
    print(f"\nSummary:")
    print(f"Successfully cancelled: {len(cancelled)} batches")
    print(f"Failed to cancel: {len(failed)} batches")

    if failed:
        print("\nFailed batches:")
        for batch_id, error in failed:
            print(f"- {batch_id}: {error}")

def main():
    args = parse_args()
    cancel_batches(args.batch_objects_file)

if __name__ == "__main__":
    main()


v2: Update default BCs to v11.6.0

This updates the default BCs to v11.6.0. This is mainly for R21C work, but might as well update it for future work as well.

Your development orb(s) have been published. It will expire in 30 days.
You can preview what this will look like on the CircleCI Orb Registry at the following link(s):
https://circleci.com/developer/orbs/orb/geos-esm/circleci-tools?version=dev:3b861eb1b5c76a093156385ccd5b8de127dc84a8
https://circleci.com/developer/orbs/orb/geos-esm/circleci-tools?version=dev:alpha

Your development orb(s) have been published. It will expire in 30 days.
You can preview what this will look like on the CircleCI Orb Registry at the following link(s):
https://circleci.com/developer/orbs/orb/geos-esm/circleci-tools?version=dev:3b861eb1b5c76a093156385ccd5b8de127dc84a8
https://circleci.com/developer/orbs/orb/geos-esm/circleci-tools?version=dev:alpha

Your orb has been published to the CircleCI Orb Registry.
You can view your published orb on the CircleCI Orb Registry at the following link:
https://circleci.com/developer/orbs/orb/geos-esm/circleci-tools?version=2.12.0

Your development orb(s) have been published. It will expire in 30 days.
You can preview what this will look like on the CircleCI Orb Registry at the following link(s):
https://circleci.com/developer/orbs/orb/geos-esm/circleci-tools?version=dev:3b861eb1b5c76a093156385ccd5b8de127dc84a8
https://circleci.com/developer/orbs/orb/geos-esm/circleci-tools?version=dev:alpha


Resolve ambiguous reference to Expression in iOS 18 SDK.

The Foundation module in the iOS 18 SDK contains a new Expression type that conflicts with the Expression type in SQLite. Add an explicit prefix to resolve the ambiguity.

I was literally about to do the same! 🙌🏼

I apologize for the delay cause I'm actually on my honeymoon, but I do want to say thank you for the contribution @samalone! The change looks small and measured so I'll merge this in now, but probably won't find time to cut a new release with the change until I have a real spare moment.

Updated Bodega to 2.1.3 and Boutique to 2.4.5 to resolve these issues. I didn't fully test it the way I normally would so if you run into errors please let me know, through other channels (Threads or Mastodon DMs) if need be.


attach WAF and Shield to API

Attach AWS WAF and Shield to API to prevent fraud and DDoS attacks

Will not be implemented as it is not part of free tier


PDF tables to CSV files

Aim

Script to convert the tables in the PDF file into CSV files.

Details

Each CSV file has one table from the PDF and the number of CSV should be equal to the number of tables in the PDF.

Can we use this API to complete this task?

Sure.. @Siddhant-K-code

@Siddhant-K-code Should I assign this to you?

yes, please.

sample1.pdf
Here You go... Assigned to you.. @Siddhant-K-code


unable to run the program in debug mode with pdb

Currently, due to the reason that now we use multi-processing for nearly the whole template searching, it is impossible to run debug mode with pdb with step by step.
Maybe we need a debug mode that run one evaluate() function one time only but not multiprocess for debugging purpose.

I find one possible way to debug, I will put codes here if some one also need:
import sys
import pdb

class ForkedPdb(pdb.Pdb):
    """A Pdb subclass that may be used
    from a forked multiprocessing child

    """
    def interaction(self, *args, **kwargs):
        _stdin = sys.stdin
        try:
            sys.stdin = open('/dev/stdin')
            pdb.Pdb.interaction(self, *args, **kwargs)
        finally:
            sys.stdin = _stdin

After adding this class, run with
ForkedPdb().set_trace() and you can enter the debugging mode

It depends on which part of the code do you want to run pdb in:

for 'pipeline evaluation' only you can use 'combinatorial_search/TemplateSpaceBaseSearch.py' as search method which does not do any multiprocessing.
if you want to step through other aspects of search I am afraid using breakpoints is not reasonable. It is a classical challenge in multiprocessing applications.
Let me know what exactly you want to do?

Yes, that way seems works. But one thing need to notice is that we still need to use Forkedpdb instead of normal pdb from python.


Make library installable

I should follow this guide, when i will have time

this is a sample project were to take from all the informations about installation of the library


ControlNet Maps produce barcode / vertical line map image

Added many extensions to webui and had this issue with controlnet maps produced.
The solution for anyone who runs into same issue is to disable the following extension:
stable-diffusion-webui-auto-tls-https
not sure why this is, but will post on their git as well

Update. This issue was not caused by the stable-diffusion-webui-auto-tls-https extension as I originally thought. It was actually caused by the browser I was using; LibreWolf.  No issue while using Firefox browser.


Please add support for shopspring/decimal

I have an error when I run swag init.
product.go
type(

        Product struct {
		ID        int      `json:"id"`
		Offers    []*Offer `json:"offers"`
	}

	Offer struct {
		ID           int             `json:"id"`
		SKU          string          `json:"sku"`
		Price        decimal.Decimal `json:"price"`
		PriceWithVAT decimal.Decimal `json:"price_with_vat"`
		Currency     string          `json:"currency"`
		Stock        int             `json:"stock"`
		Merchant     *Merchant       `json:"merchant"`
	}

)

domain.go
// API List products godoc
// @Tags products
// @Summary List products
// @Produce  json
// @Success 201 {object} products.Product ""
// @Failure 400 {object} errors.ErrorResponse
// @Failure 500 {object} errors.ErrorResponse
// @Router /products/ [get]

Error:
Decimal is not supported. but it will be set with string temporary.
Please report any problems.Decimal is not supported.
but it will be set with string temporary.
Please report any problems.2018/05/08 11:31:42 Generating products.Merchant
panic: not supported&{773 0xc4204fd830}

As you notice, I am having problems with type Decimal, but also with pointer (to Merchant) inside Offer struct. Can you also add support for pointers?

OK. I check.
And I add plugin for special types.

I support ptr slice and Decimal.
I don't understand problem in products.Merchant.
How do you have struct. Please more info.

Probably all was solved.
Please wait for the merge.

@jmcalves275  Fix via #113. please update swag to  the latest version and reopen this issue if have any problems.
And we will create plugin function asap to support for any specific type that is not basic types. 🎉 🎉


Add default githooks for tests and flake8

Overview
Git hooks are useful tools that run commands before you commit
Expected Behavior
We should have a default githook script and instructions on how to install the git hook.
Technical details

Add .githook-pre-commit file with the script to run the tests (tests/test-docker.sh) and flake 8 on both of the codebases.
Add instructions for the docs about how to copy this file to the right place and rename it so that the hooks execute before a commit.

Acceptance criteria

[ ] Working githooks with tests and flake8
[ ] Documentation for the githooks

NOTE: All PRs must follow the standard PR checklist.

I guess this can be closed as it was implemented in #51 ?

Indeed, closing. Thanks @WGierke !


CSV variables are not syntax-highlighted as expected.

When we have a CSV of variables, only the first variable is highlighted, while all of them should be.

That oughta fix it.


Add intro to API docs

Proposal:
Add preface or introductory material at the beginning of the swagger API docs.
Current behavior:
On the main API docs page, we don't find any overview content to get started.
Desired behavior:
Give folks an overview of the basics/where to start. Accepted request body formats, return response formats, response codes used, errors, how authentication works.
Use case:
This info is important for developers using our API.
cc @stephanie-engel  @rhajek @influxdata/docs-team

Good idea


cherry pick: feat: remove private repository ssh workarounds

Description of change
Cherry pick of https://github.com/iotaledger/iota/pull/4108
Links to any relevant issues
Fixes https://github.com/iotaledger/iota/issues/2149 in testnet branch
Type of change

Bug fix (a non-breaking change which fixes an issue)

How the change has been tested
In other branch

Will be updated without PR


Make 0.10 release

From template: https://gist.github.com/milutz/d3a975201c31d0d760719d7e9f8bd122
Checklist for issuing the 0.10.0 version of articulate

[x] Make branch, push on GitHub

git clone https://github.com/samtecspg/articulate.git
cd articulate
git checkout -b 0.10
git push -u origin 0.10

[x] Update main compose with the version of this release

sed -i -- "s/repo-head/0.10.0/" docker-compose.yml

[x] Do a test build and run to make sure it doesn't immediately blow for some reason

docker images
# Make sure there are any images matching the version your building in your cache!!
docker-compose -f docker-compose.yml -f build-compose-override.yml up
# jump in the web interface, give it a test spin

[x] Get the changes checked back in then tag to kick off a build

git add docker-compose.yml
git commit -m "Updates for 0.10.0 release"
git tag -a v0.10.0 -m "Release tag for 0.10.0 release"
git push
git push origin v0.10.0

[x] build the docker-compose zip file

./package.sh v0.10.0

[x] (after docker cloud is done with the build) unzip the zip - do a compose up and test

cd `mktest -d`
unzip [where-ever-package-is.zip]
cd articulate*
docker-compose up

[x] Make a new release on github off the release tag, upload zip made by the packaging script

Closed with release https://github.com/samtecspg/articulate/releases/tag/v0.10.0

Quick turn on 0.10.1 release:

[ ] Update main compose with the version of this release

sed -i -- "s/0.10.0/0.10.1/" docker-compose.yml

[ ] Do a test build and run to make sure it doesn't immediately blow for some reason

docker images
# Make sure there are any images matching the version your building in your cache!!
docker-compose -f docker-compose.yml -f build-compose-override.yml up
# jump in the web interface, give it a test spin

[ ] Get the changes checked back in then tag to kick off a build

git add docker-compose.yml
git commit -m "Updates for 0.10.1 release"
git tag -a v0.10.1 -m "Release tag for 0.10.1 release"
git push
git push origin v0.10.1

[x] build the docker-compose zip file

./package.sh v0.10.1

[x] (after docker cloud is done with the build) unzip the zip - do a compose up and test

cd `mktest -d`
unzip [where-ever-package-is.zip]
cd articulate*
docker-compose up

[x] Make a new release on github off the release tag, upload zip made by the packaging script

Quick turn on 0.10.2 release:

[x] Cherry pick the change for the release

git cherry-pick -x 75f360868a5a10890af1facb642058880fd70158

[ ] Update main compose with the version of this release

sed -i -- "s/0.10.1/0.10.2/" docker-compose.yml

[ ] Do a test build and run to make sure it doesn't immediately blow for some reason

docker images
# Make sure there are any images matching the version your building in your cache!!
docker-compose -f docker-compose.yml -f build-compose-override.yml up
# jump in the web interface, give it a test spin

[ ] Get the changes checked back in then tag to kick off a build

git add docker-compose.yml
git commit -m "Updates for 0.10.2 release"
git tag -a v0.10.2 -m "Release tag for 0.10.2 release"
git push
git push origin v0.10.2

[ ] build the docker-compose zip file

./package.sh v0.10.2

[ ] (after docker cloud is done with the build) unzip the zip - do a compose up and test

cd `mktest -d`
unzip [where-ever-package-is.zip]
cd articulate*
docker-compose up

[ ] Make a new release on github off the release tag, upload zip made by the packaging script


-[UPPDiscovery stopSearching]

UPPDiscovery needs a stop searching method to shut down the multicast socket.

Send bye bye too


bump KFM image tag to a5eb456

Bumping KFM inmage tag to a5eb456

Thanks @vmanley

@machi1990 Thank you for quick check and merge!


Pagination and highlighting ?

Any chance of adding pagination and highlighting of the content ? Total Hits ? Time Taken ?

Hi!Thx a lot and what about adding highlighting field in showing results?


Job with concurrency key blocked when it shouldn't have, eventually was run after duration expired

We are observing that our jobs are sometimes unnecessarily blocked.
In the following example, for the same concurrency key, there are only 2 jobs. The first one completes immediately in just over a 100 milliseconds (finished_at value).
The second one takes over 30 minutes, we are guessing it is blocked by the concurrency control duration. The scheduled_at time of the second job is much after when the first job completes.
As per our understanding, the second job should have started immediately.
We confirmed that none of the jobs processes bounced during that time.
... indicates redacted data.
Concurrency Config
limits_concurrency to: 1, key: ->(action, params) do
  ...
end, duration: 30.minutes

Queue Config
dispatchers:
    - polling_interval: 1
      batch_size: 500
workers:
    - queues: [<queue of blocked job>, "*"]
      threads: 3
      processes: <%= ENV.fetch("JOB_CONCURRENCY", 1) %>
      polling_interval: 0.1

Console queries
SolidQueue::Job.where("DATE_PART('minutes', finished_at - scheduled_at) >= 30").count
=> 1

SolidQueue::Job.where(concurrency_key: '...').select(:active_job_id, :scheduled_at, :finished_at).order(:finished_at)
=>
[#<SolidQueue::Job:0x00007f062d151a50
  active_job_id: "60916418-e7a3-4f1e-9171-357b6e52c154",
  scheduled_at: "2024-12-16 01:20:09.441199000 +0000",
  finished_at: "2024-12-16 01:20:09.648985000 +0000",
  id: nil>,
 #<SolidQueue::Job:0x00007f062d151910
  active_job_id: "3c4f34da-9db7-430e-9cbe-c1214f98ccb9",
  scheduled_at: "2024-12-16 01:54:49.287841000 +0000",
  finished_at: "2024-12-16 02:24:50.264702000 +0000",
  id: nil>]

Logs about the second job execution
I, [2024-12-16T02:24:50.154361 #84]  INFO -- : [ActiveJob] [...] [3c4f34da-9db7-430e-9cbe-c1214f98ccb9] Performing ... (Job ID: 3c4f34da-9db7-430e-9cbe-c1214f98ccb9) from SolidQueue(...) enqueued at 2024-12-16T01:54:49.287885003Z with arguments: ...
I, [2024-12-16T02:24:50.264573 #84]  INFO -- : [ActiveJob] [...] [3c4f34da-9db7-430e-9cbe-c1214f98ccb9] Performed ... (Job ID: 3c4f34da-9db7-430e-9cbe-c1214f98ccb9) from SolidQueue(...) in 110.35ms

As per our understanding, the second job should have started immediately.

That's right. The first job should have unblocked the second job here 🤔 Would it be possible for you to enable Active Record logs at the debug level to see what's happening when the first job runs and tries to unblock it?

That would be a lot of logging unfortunately I think. And this isn’t that common I think.

I'll see if I can add it in our staging environment. My plan is to add an initializer which basically does
module SolidQueue
  class Job
    def unblock_next_blocked_job
      ActiveRecord.verbose_query_logs = true
      super
    ensure
      ActiveRecord.verbose_query_logs = false
    end
  end
end

@rosa Are debug logs prefixed with SolidQueue::Semaphore sufficient
Went with a different approach which right now allows debug logs prefixed with SolidQueue::
class FilteredSqLogger < ActiveSupport::Logger
  def debug(progname = nil, &block)
    super if progname.match(/^\s+SolidQueue::/)
  end
end

I think you could try SolidQueue::Semaphore and SolidQueue::BlockedExecution. I think any clues would involve any of those records.

Ended up going with /^\s*SolidQueue::(?!Process)/ since Process was the most noisy. I will post an update to this issue once we see regression.

Ohhhh, this is super useful, @leondmello! I think I know what's going on, thanks to your logs. Looks like a tricky race condition.  Basically, what happens is that your first job finishes before the second one has been enqueued and blocked, not before enough to have unblocked the semaphore but before enough to not see it blocked yet. Here's the first job finishing:
finished_at: "2024-12-23 11:54:57.793273000 +0000"

Then, when that job finishes, it unblocks the semaphore, here:
D, [2024-12-23T11:54:57.872605 #97] DEBUG --

Here's the second job enqueued:
scheduled_at: "2024-12-23 11:54:57.832971000 +0000"

At that point the semaphore hasn't been updated yet, because it was updated at 11:54:57.872605, so it gets blocked. However, when this SELECT runs, the blocked execution mustn't have been created yet:
D, [2024-12-23T11:54:57.879150 #97] DEBUG -- :   SolidQueue::BlockedExecution Load (5.8ms)  SELECT "solid_queue_blocked_executions".* FROM "solid_queue_blocked_executions" WHERE "solid_queue_blocked_executions"."concurrency_key" = '...' ORDER BY "solid_queue_blocked_executions"."priority" ASC, "solid_queue_blocked_executions"."job_id" ASC LIMIT 1 FOR UPDATE SKIP LOCKED

So it can't get unblocked, because it's not completely blocked yet. Ahh, tricky!
What isolation level are you running?

What isolation level are you running?

We have this in our application.rb,
    config.active_support.isolation_level = :fiber

But don't know the reason as to why that was added some time ago. Trying to find out.

@leondmello, no, no worries about that. I meant the transaction isolation level in your DB (I imagined you're using PostgreSQL because of the logs), but thinking more about it, it shouldn't make any difference, so no worries about it.
It's a tricky one, I'm not sure right now about how to fix it but I'll keep thinking about it.

Thinking more about this and how to fix... Claiming the semaphore + enqueuing the job happens in a transaction, but the semaphore is not locked if it exists because it's just checked, so it can be released while the transaction is ongoing, and you wouldn't know, regardless of whether  READ COMMITTED or REPEATABLE READ is used as isolation level (the most common isolation levels), because you'd just read that once in the beginning.
I think, to fix this, we'd have to take a lock there, when checking the semaphore, and releasing it when the transaction is committed 🤔 However, this might introduce a new kind of deadlock I can't see right now (I've fixed a couple of deadlocks here in the past) so I need to think carefully about it.


No output even after 10 minutes

Here's my stack:
robotframework==2.9.2
robotframework-selenium2library==1.7.4

This is an example Robot file I have:
*** Settings ***
Library  Selenium2Library  10

*** Test Cases ***
Dummy Test
    Open Browser  http://google.com  browser=chrome
    # ... omitted keywords below

Here's how I run it:
pybot dummy_suite.robot

Trial 1:
Only this much output I see for more than 10 minutes:
==============================================================================

Dummy Suite

==============================================================================

A blank log.xml file gets generated. No log.html and report.html generated for this trial.
And here's the gist of syslog: https://gist.github.com/vishaltelangre/2ff5ae72e5618c6142703051af8b507c#file-syslog-trial-1-txt
Trial 2:
In trial 2, for the same test, it finishes in a few second successfully:
==============================================================================

Dummy Suite

==============================================================================

Dummy Test                                                                    | PASS |

1 critical test, 1 passed, 0 failed

1 test total, 1 passed, 0 failed

==============================================================================

Output:  /home/vishal/tmp/log.xml

Log:     /home/vishal/tmp/log.html

Report:  /home/vishal/tmp/report.html

Here's the syslog for trial 2: https://gist.github.com/vishaltelangre/2ff5ae72e5618c6142703051af8b507c#file-syslog-trial-2-txt

As you can see, no reason why trial 1 was not responding (for more than 10 minutes), but when retried it worked in trial 2 (just in few seconds).
This behaviour is not reproducible, but happened so many times with me.
Can anybody help me to understand (by looking at the syslog), whether there is any issue with the pybot (or robot framework) itself or not?

From the logs, I understand that in trial 1 robot is stuck at finding/importing selenium. Hence the excess time taken. Since the test cases are not run the xml is empty.
My 2 cents.

With some more trials today, I was able to get the same test to stuck for more than 10 minutes with the --debugfile option to pybot command. I was able to retry it successfully in the previous and next tries.
To understand it clearly, I have used the same terms, viz. trial 1 and trial 2 alike above. Here are the generated debug files to shed more light on this issue:

Debug file for trial 1: https://gist.github.com/vishaltelangre/9daf5efe96541d59870012c4d69a9022#file-debugfile-of-trial-1-txt
Debug file for trial 2: https://gist.github.com/vishaltelangre/9daf5efe96541d59870012c4d69a9022#file-debugfile-of-trial-2-txt

Beside this, I have noticed no difference between the syslog files (and xml files) generated this time with the ones which I had mentioned in the description of this issue earlier.

For some reason execution hangs in Open Browser keyword. Apparently there's an issue launching the browser via Selenium and Selenium2Library. Keyword not returning is not a bug in Robot and thus I close this issue. Things you could try:

Try reproducing the issue with Selenium only. If the same problem occurs also then, please submit an issue to Selenium issue tracker.
Investigate could Open Browser keyword get an optional timeout argument to control how long to wait for the browser to open.
Use Robot's timeout functionality to stop the hanging keyword. Notice that a problem with timeouts is that killed keywords may leave resources hanging behind even if test execution would continue.

@pekkaklarck Thanks a lot for detailed explanation.
It appears that open browser keyword may be having some issues. I will look into wrapping it up with a timeout in an user keyword as suggested.

Yeah, using timeouts ought to be an OK workaround. It would be great if you had time to debug the problem further, though. Based on the findings either Selenium or Selenium2Library could then be enhanced.


Falco 101 installation section not complete

What happened:
Hi,
I am doing the falco 101 training. I went through the installation topic. At the end, there is a section about installing on kubernetes and using a values.yml file, but this file does not yet exist so it says  this will be used in the next lab. However, there is no next lab? I complete the course and everything I completed, but the overview of the course still says "in progress"?
Also, can I do the exam and get the cert even without the sections complete?
Please advise.
What you expected to happen:
Go to next section with using the values.yml file, or mark course as complete.
How to reproduce it (as minimally and precisely as possible):
Run through falco 101 course.
Anything else we need to know?:

Hi GurdipS5,
I executed the lab and ran into the same issue, and with a closer read I found that this command isn't supposed to be run:

[...] Then, you can add any changes you want, such as custom rules in a values.yaml file. Do not execute the command below. You'll practice this in the next labs:

It's just an example. 😄
I hope this has helped!
Thank you

So did the lab complete when you ran that command?
On Mon, Sep 2, 2024 at 10:26 AM Paul Hodgetts @.***>
wrote:

Hi GurdipS5,
I executed the lab and ran into the same issue, and with a closer read I
found that this command isn't supposed to be run:
[...] Then, you can add any changes you want, such as custom rules in a
values.yaml file. Do not execute the command below. You'll practice
this in the next labs:
It's just an example. 😄
I hope this has helped!
Thank you
—
Reply to this email directly, view it on GitHub
https://github.com/falcosecurity/falco-website/issues/1356#issuecomment-2324258888,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AU2JXHH7UNM5OEFKUGFJ4BLZUQVMXAVCNFSM6AAAAABNGMJMNSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRUGI2TQOBYHA
.
You are receiving this because you authored the thread.Message ID:
@.***>

Hey @GurdipS5 , I asked the Sysdig training team for further clarification on this potentially "not completing" training, to get assistance please write to<EMAIL_ADDRESS>and they'll be happy to help you! 🚀

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Provide feedback via https://github.com/falcosecurity/community.
/lifecycle stale


Low priority VMs in AKS NodePool with VMSS

The Azure RM template for virtual machine scale sets contains a priority attribute to create a scaleset with low priority VMs. (See: VMSS Docs )
The template for creating Azure node pools for AKS does not.
Is it possible to create a virtual machine scale set with low priority VMs?

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

ID: 8c420b2c-e868-9a6a-49fb-913f2cd007ef
Version Independent ID: 5c543e08-7d75-21eb-9510-22e2cd56d16b
Content: Use multiple node pools in Azure Kubernetes Service (AKS)
Content Source: articles/aks/use-multiple-node-pools.md
Service: container-service
GitHub Login: @iainfoulds
Microsoft Alias: iainfou

@patst
Thanks for the question! We are investigating and will update you shortly.

@patst Currently thats not supported. We get to select the agent pool type from AvailabilitySet or VirtualMachineScaleSets.
You can consider using Virtual nodes where it uses ACI in the backend to deploy containers. In ACi containers are charged per second basis.  Its better suited for transient loads and CI workloads.

@jakaruna-MSFT thanks for the fast reply and the information.
Maybe it will be possible to reference a existing VirtualMachineScaleSet in the future. With that the configurations from the VirtualMachineScaleSet docs may work.

I'm not satisfied with this answer and the closure of the issue.
For me it appears Priority/Preemption is available in the AKS API: https://docs.microsoft.com/en-us/rest/api/aks/managedclusters/createorupdate#scalesetpriority
However it does not seem to be available in Azure CLI yet. az aks nodepool add -h does not list any options about it.
It should be a fairly trivial thing to expose this in azure-cli if it's available in the API, no?

Can we reopen this? I don't understand why Azure people are closing issues when there was no resolution while it could be solved, seen this multiple times already.

@StianOvrevage Now az aks nodepool add already exposes scaleset priority. However, I need to enable the AKS Preview Features (https://github.com/Azure/AKS/blob/master/previews.md) to be able to execute it successfully.

@ybuasen even after enabling  AKS Preview Features
 --priority                        : The priority of the node pool.  Allowed values: Regular,
                                        Spot.  Default: Regular.

@ybuasen even after enabling AKS Preview Features
 --priority                        : The priority of the node pool.  Allowed values: Regular,
                                        Spot.  Default: Regular.

@niteesh You need to set --priority to "Spot". Low-priority has been discontinued and replaced by Spot.
The below information is from Microsoft (https://azure.microsoft.com/en-us/pricing/spot/#documentation)
"The preview of Azure low-priority VMs on scale sets has been discontinued and has been retired as of February 3, 2020. Spot VMs have replaced Azure low-priority VMs and will include new capabilities, such as variable pricing. Spot pricing is also available on both single VMs and VMSS."


Ctrl fix

Adds the ability to handle a SETUP request which arrives when the control OUT is in the StatusOut state. This happens quite frequently on our SAMD21 hardware.

Closing this as the PR pulled in a bunch of other commits than the intended one, and I think we've fixed that issue in the SAMD HAL.


[Mod] TU Recolors (Stock,

Mod info

Mod name: Textures Unlimited Recolour Depot
Author(s): Manwith Noname,
License: CC BY NC SA
Homepage: https://forum.kerbalspaceprogram.com/index.php?/topic/174188-112x-textures-unlimited-recolour-depot/
Download: Listed in forum post

Duplicate of #7961, closed because the download links are on Google Drive, which doesn't work with CKAN. Checking now, this still seems to be the case. There was a chat with the author at that time:

https://forum.kerbalspaceprogram.com/index.php?/topic/174188-112x-textures-unlimited-recolour-depot/&do=findComment&comment=4037909
https://forum.kerbalspaceprogram.com/index.php?/topic/174188-112x-textures-unlimited-recolour-depot/&do=findComment&comment=4039120
https://forum.kerbalspaceprogram.com/index.php?/topic/174188-112x-textures-unlimited-recolour-depot/&do=findComment&comment=4040149

alright, thanks for the response, have a nice day

Oops, I'm sorry I was so terse about that. Thanks for contacting us, it's always helpful to hear about requests for mods, and you could not have been expected to know about that previous exchange. Cheers, and here's hoping there's a shift in this mod's hosting in the future!

i didn't mean to be rude or anything, that's just my way of typing lol, anyways thanks for the response, bye


import problem

i would like to thank you first for this beautiful project, we currently have an issue with this module as we try to import data
it doesn't select the file so the import process doesn't start.
here is a screen shot of the error, i think this also happens  when in other places two.

Hi @MrJico! thanks for using this app and tell me about the issue :) Just made a fix for it, so you can update the app in your system and everything will be working fine when importing files. Take in mind that the rule is not tu upload to S3 any file used for being imported:
		# Do not apply for Data Import files
		if self.attached_to_doctype in ("Data Import"):
			return False

Please tell me if everything works fine at your side ;)

thanks for the quick reply, i will update my local version and test the solution.


increase the reservesize to 2^23 chunks (~33 GB)

the mainnet has recently seen an increase in storage radius to radius 10.
this has doubled the neighborhood count to 1024 and left MANY neighborhoods running on fewer than 2 nodes, in some cases, zero peers, leading to data loss.
An immediate effect of increasing the reserve size is the decreasing of the radius so that neighborhood count is halved and neighborhoods are populated sufficiently again.
Also, it should be the long term goal of the team to balance bee resource and hardware requirements, and the number of nodes required to store data in the network, and in this regard, reservesizes are currently too small, and needs to be increased to improve this balance.
Tasks:

[ ] double reserve size
[ ] tweak the redistribution phase durations so that sufficient time is given for the sampler to finish the new reserve size of chunks

proposal https://hackmd.io/bqoWRODNQReNHYoBe3oAsw

proposal https://hackmd.io/bqoWRODNQReNHYoBe3oAsw

please make these documents public accessible. Following these links I receive a 403

We expect this will improve the batch utilisation issue. Before proceeding with implementation of this, we need green lights from the research team. @ct-ctrl @zelig

@nikipapadatou This will improve the issue of small neighborhood populations.

closing due to swip21


Make web app mobile friendly

In mobile that web app looks exactly like you have opened it in desktop which result in large view but small text.

Area's still in bad condition:

Home page
Log In

Possible reason may be the image which we are using is making page looks wider. One more reason can be the footer.


Support for electron apps

Currently, Browser library does not support running electron apps like Selenium. The way I understand it, there is some work done on Playwright side to implement Electron but not yet on Browser side.
Could this be a point of interest for the future?

The electron app support is difficult because it doesn't use the browser/ contex / page model. Instead it's single application or an object, therefore it is difficult to incorporate to our library. I am not saying that it could not be done, but I am pretty sure that it could mess up the current architecture. Therefore I am closing this issue.

I see that Playwright has an experimental Electron support here https://playwright.dev/docs/api/class-electron
Is it possible to use the "extending with JS module" feature https://marketsquare.github.io/robotframework-browser/Browser.html#Extending Browser library with a JavaScript module
To have somewhat an Electron support? I am not asking this library to do it, but probably just some useful pointers.


evaluable field changed to serverEvaluable

@devendra-tarento @sohailamjad12 @santhosh-tarento pls review this PR and merge the changes


modprobe when needed

in bridge driver modprobe for br_netfilter only if EnableIPTables==true
also call FirewalldInit() only if EnableIPTables==true
move modprobe for nf_nat and xt_conntrack in iptables.initCheck()

Related to https://github.com/docker/docker/issues/16964
Signed-off-by: Alessandro Boch<EMAIL_ADDRESS>

LGTM

LGTM

Hello,
A question in lines of "bridge under /proc/sys/net/ being unavailable". Is there a way to modprobe in docker or any other solution to make it available?
Any inputs greatly appreciated!
Thanks!


Various issues

Ciao Alessandro.
I've found various issues while trying to use pflask. For example this command works:
root@localhost:~# pflask --chroot=rootfs -- id
uid=0 gid=0
[✔] Child exited

But this doesn't:
root@localhost:~# pflask --chroot=rootfs --user=root -- id
[✘] Error mounting 'sysfs': Operation not permitted
[✘] Child failed with code '1'

The CLI help text says the default is root for --user, yet it doesn't work if it's specified.
Also please note I get a segfault when using --netif:
root@localhost:~# pflask --chroot=rootfs --netif -- id
Segmentation fault

Second GDB, problem is at #2  0x000000000040962c in validate_optlist (name=0x40d012 "--netif", opts=0x0) at ../src/pflask.c:323

Thanks for reporting!

But this doesn't:
root@localhost:~# pflask --chroot=rootfs --user=root -- id
[✘] Error mounting 'sysfs': Operation not permitted
[✘] Child failed with code '1'
The CLI help text says the default is root for --user, yet it doesn't work if it's specified.

The problem here is that an explicit --user also automatically enables the user namespace support. Unfortunately to use --chroot with user namespaces, the --user-map option is needed (see example in the README). The man page didn't mention this, so I just pushed a change that clarifies this a bit.
In your case, for using --user and --chroot without user namespaces, you should also pass --no-userns which explicitly disables userns. This is not very ideal, so I may change it somehow in the future (suggestions welcome!).

Also please note I get a segfault when using --netif:
root@localhost:~# pflask --chroot=rootfs --netif -- id
Segmentation fault

Ugh, fixed.

@ghedo thanks! those issues are actually fixed. Now if I add --no-userns it works:
root@localhost:~# pflask --chroot=rootfs --user=root --no-userns -- id
uid=0 gid=0
[✔] Child exited

The issue could be closed now, however I have one question, maybe you can help me with it as I suspect it's not possible to achieve what I have in mind. I have been trying various tools (unshare, contain, LXD etc) without success, my goal is in a few words:
Run a process as user nobody within the container, mapped to subuid/subgid of a non-root user on the host
I am using a busybox chroot for this experiment

I have seemingly correct subuid/subgid definitions on host:
root@localhost:~# cat /etc/subgid
root:100000:65536
myuser:296608:65536
myuser:100000:65537
root@localhost:~# cat /etc/subuid
root:100000:65536
myuser:296608:65536
myuser:100000:65537

First I'd try to map nobody within the container as a subuid/subgid of root on host, and maybe later make it work with non-root on the host, however with pflask I am really not able to carry this out. For example, I thought this would be the correct syntax:
root@localhost:~# pflask --chroot=rootfs --user-map=0:100000:65536 --user-map=1:100000:65536 --user=nobody -- id
newuidmap: write to uid_map failed: Invalid argument
[✘] newuidmap 256 returned 4248856

But I get that newuidmap error :(

root@localhost:~# pflask --chroot=rootfs --user-map=0:100000:65536 --user-map=1:100000:65536 --user=nobody -- id
newuidmap: write to uid_map failed: Invalid argument
[✘] newuidmap 256 returned 4248856

The following command works for me (using only one --user-map):
$ pflask --user-map=0:100000:65536 --user=nobody -- id
uid=65534(nobody) gid=65534(nogroup) groups=65534(nogroup)

As for the --chroot option, pflask currently can't mount sysfs from inside a user namespace, so you need to remove lines 189 and 190 in mount.c to make it work for now. I'm still trying to figure out a proper workaround for this.

For the record, the --chroot option used to work fine with user namespaces in older Linux versions, but then something changed and now it doesn't work anymore.

@ghedo thanks for the example. I am fiddling around with it, I supposed one should first mount and then drop privileges to the selected user?
This is what I am using at the moment:
root@localhost:~# build/pflask --user-map=0:100000:500 --user-map=`id -u nobody`:100500:500 --user=nobody -- id
uid=65534(nobody) gid=65534(nogroup) groups=65534(nogroup)
[✔] Child exited

Not using overlapping ranges works, although I still get permission errors when trying to use --chroot (even by disabling the mount you suggested), because it fails with other mount points too (proc etc).

Also, I think -M should be disallowed with --chroot (or they can work together?)

Btw, if I disable all the mounts in mount.c, I get:
# build/pflask --chroot rootfs --user-map=0:100000:500 --user-map=`id -u nobody`:100500:500 --user=nobody -- id
[✘] Error creating file 'rootfs/dev/console': Permission denied
[✘] Child failed with code '1'

So it needs at least the console device :)

The following command works for me if I remove the sysfs mount code:
$ pflask --user-map=65534:100000:1 --user-map=0:100001:65534 --user=nobody --chroot=$HOME/local/rootfs

In fact I can actually map nobody inside the container to my own user outside of the container:
$ pflask --user-map=65534:$UID:1 --user-map=0:100001:65534 --user=nobody --chroot=$HOME/local/rootfs

with 65534 being the UID of nobody, and $UID being my user's UID.

Also, I think -M should be disallowed with --chroot (or they can work together?)

If you run pflask as root it should work just fine, however it doesn't unmount all the additional mount points on exit (this is normally not necessary since when the mount namespace is destroyed the mount points are automatically purged) so you'll have to do that manually.

@ghedo I've pinpointed the problem, see also this commit where I temptatively show how that there are 3 scenarios already :(
With kernel 3.13.0-45 I have to build with everything disabled (kernelQuality=0), with kernel 3.19.0-28-generic I can use your workaround (disabling only sysfs mount, kernelQuality=1), while with 3.16.0-45 there is no problem and everything can be mounted in the chroot (kernelQuality=2).
This issue is similar, and it's correctly blamed to a kernel bug upstream (the lack of this kernel commit), as explained here<EMAIL_ADDRESS>I don't think it's easy to detect automatically which value kernelQuality should have, and anyway functionality is mutilated except when kernelQuality==2, so I suggest to not support at all buggy kernels; I think only improvement that could be done is to mention in documentation that Ubuntu kernels for Trusty are not currently in best shape, and that on Trusty a known good kernel is 3.16.0-45.
It's possible they will fix it (as it's an LTS), but right now this is the situation. With Vivid things might be already better, but I don't use that.

No luck with Vivid's kernel 3.19.8 :(
At this point I give up, I will use the chroots without sysfs...

I'm on Linux 4.2 now (which is supposed to have the commit you linked) but still no luck with sysfs. I also tried LXC and it works fine, so I'm guessing there's also a problem in pflask. I'll try to see what LXC does that pflask doesn't.

Also thanks for your research :)

You're welcome :)

@gdm85 I found that the reason why sysfs can't be mounted with userns is this commit https://github.com/torvalds/linux/commit/7dc5dbc879bd0779924b5132a48b731a0bc04a1e, which prevents mounting sysfs unless you have CAP_SYS_ADMIN rights over the network namespace (the reason why I remember this working is probably that when I first implemented this I was on an even older kernel).
The only workaround is to enable a network namespace with --netif, which is kind of a problem because unprivileged containers can't create network interfaces so they would lose networking completely...
Also, the reason why LXC seems to work is that they enable the netns by default, so there's really no other way around this. The good news is that it's not a pflask bug :/
I'll try to somehow explain this in the documentation.

@ghedo this sounds familiar somehow, maybe I've read about it in some old Docker issue. Would it be possible somehow to mount sysfs before cloning (and thus dropping the network namespace)?
On an unrelated topic, I am experimenting how to call pflask with a symlink (pflask-drink, probably) so that apparmor limitations can be applied only to the symlink-invoked binary that would be responsible for running the user-requested process with the further apparmor limitations; in such scenario, it would also make sense to do all the elevated privileges operations before running the containerized process.

Would it be possible somehow to mount sysfs before cloning (and thus dropping the network namespace)?

Maybe pflask could do a first clone creating only a mount namespace, mount sysfs and then clone again to create the other namespaces, but I'm not sure it would be worth the hassle since it still wouldn't work with unprivileged containers.

@ghedo I was thinking more along the lines: run all the setup stages before dropping privileges and capabilities; slightly more complex


Performance Improvements

There could be some performance improvements. Namely in makeInstrumentObjects, the whole score is still being traversed for each instrument and that is not efficient.

fixed in recent commit


Add option for exporting application version data in JSON format

Adding application version based on the exported JSON (after removing application base part and updaring version number and helm chart number) works as expected.
Import of the whole application still to be tested.

Import of the entire application works as expected as well.


Extend PulseDefaults

Fixes:
Fixes #2955 (improved error message for CmdDef.get)
Fixes #2861 (improved repr and str for CmdDef)
Changes:
qubit_freq_est and meas_freq_est now return frequency in Hz, and they warn the user of this.
Replacing CmdDef
CmdDef will be deprecated following this PR. All existing methods are supported with the following exceptions:

__init__ is called by the provider, so it doesn't take a list of user defined operation schedules. add should be used instead.
cmds and cmd_qubits are included with a deprecation message to use ops and qubits_with_op instead.

New (not in CmdDef):

qubit_ops(qubits): Return the operations that are defined for the qubit(s)
assert_has(operation, qubits): Raise a PulseError if the op isn't defined
remove(operation, qubits)

working on an alternative https://github.com/Qiskit/qiskit-terra/pull/3373 per @taalexander's request

I made a tiny change self.converter -> self._converter.
The reason is, if you add new attributes to the object, they will be serialized once you call obj.to_dict(). We don't want that, because then everytime you load the transport object into Python, you are adding new fields to it. So calling from_dict(obj.to_dict()) would not be equal to obj.
With this change, in conjunction with #3451, every attribute we add at the Python layer is private and for convenience of exposing extra methods to the user. They are not part of the schema for that object.
If other attributes are added, they should similarly be private.

Closing in favor of #3526


Remove testing dependency on openldap

Attn: @acurley @gustaflindqvist
I'd like to remove the openldap dependency from the test suite.  This would allow us to setup on travis and greatly simplify the test suite in general.
I think https://github.com/NUBIC/ladle would facilitate this, but haven't done any significant investigation into it.
Let me know your thoughts...

I think your idea is correct.  Our friends at Github use ladle for testing apps that they integrate with their repo github-ldap.  But on travis, they use openldap.  Travis allows you to install packages and numerous ldap related projects have a script, invoked during the install section of the build lifecycle, that installs openldap.
https://github.com/github/github-ldap/blob/master/.travis.yml and
https://github.com/github/github-ldap/blob/master/script/install-openldap
Perhaps that is the best first step?

Yeah, I agrees. Good first step.
—
Sent from Mailbox
On Thu, Mar 19, 2015 at 6:59 PM, Andrew Curley<EMAIL_ADDRESS>wrote:

I think your idea is correct.  Our friends at Github use ladle for testing apps that they integrate with their repo github-ldap.  But on travis, they use openldap.  Travis allows you to install packages and numerous ldap related projects have a script, invoked during the install section of the build lifecycle, that installs openldap.
https://github.com/github/github-ldap/blob/master/.travis.yml and
https://github.com/github/github-ldap/blob/master/script/install-openldap
Perhaps that is the best first step?
Reply to this email directly or view it on GitHub:
https://github.com/cschiewek/devise_ldap_authenticatable/issues/197#issuecomment-83694835

:+1:


Something went wrong

Microsoft PowerToys version
<IP_ADDRESS>
Installation method
Microsoft Store
Running as admin
Yes
Area(s) with issue?
General
Steps to reproduce
Computer was unattended at the time of the failure.  Possibly a AOMEI Backupper backup job was running.
✔ Expected Behavior
Nothing.
❌ Actual Behavior
2024-11-12.txt
Version: <IP_ADDRESS>
OS Version: Microsoft Windows NT 10.0.22631.0
IntPtr Length: 8
x64: True
Date: 11/12/2024 4:16:28 AM
Exception:
System.Runtime.InteropServices.COMException (0x80263001): {Desktop composition is disabled} The operation could not be completed because desktop composition is disabled. (0x80263001)
at Standard.NativeMethods.DwmExtendFrameIntoClientArea(IntPtr hwnd, MARGINS& pMarInset)
at System.Windows.Shell.WindowChromeWorker._ExtendGlassFrame()
at System.Windows.Shell.WindowChromeWorker._UpdateFrameState(Boolean force)
at System.Windows.Shell.WindowChromeWorker._HandleDwmCompositionChanged(WM uMsg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Shell.WindowChromeWorker._WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.PublicHooksFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
Other Software
No response

/dup https://github.com/microsoft/PowerToys/issues/30507