Added function formatting

Added a number of keywords and altered some pre-existing functionality for GMS 2.3

function
constructor
new
delete

Some of this applies to structs as well. See added integration tests for examples of formatting.
NOTE: This is my first real stab as using rust. I ask to keep that in mind when reviewing code. This is very much a learning experience.

Oh wow -- my plan had been a complete rewrite of this for 2.3. will take a look tomorrow! Appreciate the effort!

Quite funny btw that you say that this is your first stab at Rust since this project was also my first stab at Rust!

Okay! I have taken a look at it, and I first want to say how much I appreicate the PR and how nice the Rust looks! Overall, the whole repo needs more documentation, but I'm glad you managed to parse through how it works. That's really great for me to see.
So, tldr: I think we need a bit more before we merge in this pull request, and I hope these aren't disheartening to hear.
The first is this silly, but not pathological, case:
#[test]
fn local_variable_function() {
    let input = "var x = function(input){show_debug_message(input)}";
    let format = "var x = function(input) { show_debug_message(input) }";

    assert_eq!(run_test(input), format);
}

Right now, we can't pass that test (in fact, we quite garble the code). The pathological case which we can't support yet, but probably need to is the following:
var test1 = function(input) { show_debug_message(input + " One"); }, test2 = function(input) { show_debug_message(input + "Two"); }

test1("hello");
test2("hello");

Now, I don't actually think this is a hard solution. Right now, you've used function as a statement, but what if we move function to be a kind of Expression? Then we'll be able to handle functions in these locations without issue, and we can also seriously simplify out assignments. We can also make new an expression too, so we don't need to mark anything else up further.
Roughly sketching it out, new would look about like this this:
#[derive(Debug)]
pub enum Expr<'a> {
    // -- snip!
    // *new(implicit)* *comments_before_call* *call*
    New {
        comments_before_call: ExprBox<'a>,
        // will always contain a `Call`, but gives us flexibility to format more incorrect, but coherent
        // code, such as "new 5";
        call: ExprBox<'a>,
    },
    // -- snip!
}

And then we can separate out Call and some new Expression Function, which will let us slot in the Function into array lists. This also means that Calls won't need to explicitly mark if they're a constructor or not, since no function call can really be a constructor, but a function declaration can.
Separately, I'm hesitant to merge these into main without also supporting 2.3 era syntax such as Struct Literals (which personally, I find myself using quite a bit at work projects), but that doesn't need to be your responsibility. Maybe I can make a branch for 2.3, which will give me a chance to clean up a lot of my code, and then we can merge this in to there once the above has been handled in some way.
What do you think of all of this? Apologies for the wall of text!

The first is this silly, but not pathological, case:
#[test]
fn local_variable_function() {
    let input = "var x = function(input){show_debug_message(input)}";
    let format = "var x = function(input) { show_debug_message(input) }";

    assert_eq!(run_test(input), format);
}

Right now, we can't pass that test (in fact, we quite garble the code). The pathological case which we can't support yet, but probably need to is the following:
var test1 = function(input) { show_debug_message(input + " One"); }, test2 = function(input) { show_debug_message(input + "Two"); }

test1("hello");
test2("hello");

Ah. Yeah. That being left in was an oversight on my part.
I think I have a fix for this though. My issue was it was hacky (much like the lambda implementation). It'll likely get redone with the other recommended changes.

Now, I don't actually think this is a hard solution. Right now, you've used function as a statement, but what if we move function to be a kind of Expression? Then we'll be able to handle functions in these locations without issue, and we can also seriously simplify out assignments. We can also make new an expression too, so we don't need to mark anything else up further.
...
And then we can separate out Call and some new Expression Function, which will let us slot in the Function into array lists. This also means that Calls won't need to explicitly mark if they're a constructor or not, since no function call can really be a constructor, but a function declaration can.

Agree with this 100%. This approach makes much more sense in hindsight, now having figured out how everything works better.

Separately, I'm hesitant to merge these into main without also supporting 2.3 era syntax such as Struct Literals (which personally, I find myself using quite a bit at work projects), but that doesn't need to be your responsibility. Maybe I can make a branch for 2.3, which will give me a chance to clean up a lot of my code, and then we can merge this in to there once the above has been handled in some way.

That's fair. The initial goal of this branch was to fix function formatting exclusively, which ended up including constructors for structs. However, I can see the implementation of struct literals being fairly involved, so I think I'd make more sense as it's own branch.
If you did want to make a branch for 2.3 additions I could change the target branch to that.
Of course, if you're rewriting everything anyway, I'd also not have too much of an issue tossing this branch, depending on how far you are.
In the meantime, I'll try adding those changes when I get the chance. Which will likely take a while

Will make a new branch tonight and push in the little fiddly changes I have. I have nothing that would upset what you have -- mostly I'm trying to reduce the complexity of lifetimes as I now have a significantly better idea of how to program elegantly in Rust. This code base is pretty brute force with the lifetimes and what not

I've managed to simplify everything into two expressions. Many of the additional properties to statements have been removed.
Some of the modifications for statement parsing and printing (calls specifically) I've kept in simply because I'm not sure of a better way of handling lambdas.
I'll be trying to implement that edge case with a variable series of functions.
Not sure how often that'd be used, but I could probably manage it.

Has this PR gone stale or is it still in the works?

Has this PR gone stale or is it still in the works?

Has this PR gone stale or is it still in the works?

There were talks of rewriting this tool, if memory serves. But this branch isn't being worked on by me anymore. Probably safe to close this PR since there are still outstanding issues with this implementation.

@sanbox-irl if this is something that will be rewritten, I would love to be a large part of the development. If there is something that GM is missing is this. Coming from a C# background and using CodeMaid it's something I would love.


[FEATURE REQUEST] Restore: Elasticsearch in HA mode

Is your feature request related to a problem? Please describe.
Recovery feature does not work with clustered multi-node Elasticsearch. Please check #1197.
Describe the solution you'd like
Recovery code should work with clustered multi-node Elasticsearch.
Describe alternatives you've considered
N/A
Additional context
Clustered multi-node Elasticsearch requires shared folder (for example NFS) to create / restore snaphosts. Epiphany does not support such a shared storage currently.

We need to check if having ES always in K8s is acceptable (performance tests) in order to use Ceph for shared storage (will be available in K8s cluster) or implement NFS, which seems to be ok just for backup purposes.

Changing this in the context of OpenSearch. We might need to verify again how todo this there.

Not going todo anymore feature requests for Epiphany.


Godot 3.3.3-stable crashes on typing new func in vim with YouCompleteMe

Godot version
Godot_v3.3.3-stable_x11.64
System information
openSUSE Leap 15.3 x86_64 (linux 5.3.18-59.19-preempt)
Issue description
I edit my code in gVim using the language server. Connection is through YouCompleteMe. I write using GDScript only.
On some scripts, when I finish typing the signature of a function, Godot immediately crashes.
This does not happen under identical conditions but in Godot 3.3.2 stable. Only 3.3.3.
handle_crash: Program crashed with signal 11                                                                                [15:10:06]
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues
[1] /lib64/libc.so.6(+0x3a210) [0x7f71abe49210] (??:0)
[2] /home/albey/Software/Godot/Godot_v3.3.3-stable_x11.64() [0xe15f97] (??:0)
[3] /home/albey/Software/Godot/Godot_v3.3.3-stable_x11.64() [0x2f78a1a] (??:?)
[4] /home/albey/Software/Godot/Godot_v3.3.3-stable_x11.64() [0x2f288f5] (??:?)
[5] /home/albey/Software/Godot/Godot_v3.3.3-stable_x11.64() [0xe50446] (??:0)
[6] /home/albey/Software/Godot/Godot_v3.3.3-stable_x11.64() [0xe447b5] (??:0)
[7] /home/albey/Software/Godot/Godot_v3.3.3-stable_x11.64() [0x2f2cec1] (??:?)
[8] /home/albey/Software/Godot/Godot_v3.3.3-stable_x11.64() [0x2f2d90c] (??:?)
[9] /home/albey/Software/Godot/Godot_v3.3.3-stable_x11.64() [0x2f64a28] (??:?)
[10] /home/albey/Software/Godot/Godot_v3.3.3-stable_x11.64() [0x2f7fd1b] (??:?)
[11] /home/albey/Software/Godot/Godot_v3.3.3-stable_x11.64() [0xe142e4] (??:0)
[12] /home/albey/Software/Godot/Godot_v3.3.3-stable_x11.64() [0x1cda1ae] (??:0)
[13] /home/albey/Software/Godot/Godot_v3.3.3-stable_x11.64() [0x1ceb9c8] (??:0)
[14] /home/albey/Software/Godot/Godot_v3.3.3-stable_x11.64() [0x3119a3d] (??:?)
[15] /home/albey/Software/Godot/Godot_v3.3.3-stable_x11.64() [0x990dcd] (??:0)
[16] /lib64/libc.so.6(__libc_start_main+0xed) [0x7f71abe3434d] (??:0)
[17] /home/albey/Software/Godot/Godot_v3.3.3-stable_x11.64() [0x99f5ae] (??:0)
-- END OF BACKTRACE --

Steps to reproduce

Install vim (with gvim)
Install the YouCompleteMe vim plugin (I did it with vim-plug), and set it to handle the Godot Language Server. These were my YCM-godot settings in my vimrc:

set completeopt=popup,menuone

if !has_key( g:, 'ycm_language_server' )
  let g:ycm_language_server = []
endif

let g:ycm_language_server += [
      \ {
      \   'name': 'godot',
      \   'filetypes': [ 'gdscript' ],
      \   'project_root_files': [ 'project.godot' ],
      \   'port': 6008
      \ }
      \]

let g:ycm_semantic_triggers =  {
  \   'gdscript': [':', '.']
  \ }

Set Godot to use gvim as its external editor. I called these exec flags: --remote "+call cursor({line}, {col})" {file}
Create a new script, and open it through Godot, so it opens in vim.
Start typing a new function: func tester():
Once the : is typed, Godot crashes after half a second.

Minimal reproduction project
Reproduce.zip

Duplicate of https://github.com/godotengine/godot/issues/51923.


Allow Pulumi remote deploys

After https://github.com/mvgijssel/setup/issues/179 it should now be safe to deploy Pulumi from the CI (and maybe ultimately from Pulumi Cloud deployments).
Things that are challenging when using a SSH tunnel

Tunnel is opened and closed before the actual update (https://github.com/pulumi/pulumi-kubernetes/issues/1857)
If the port number in the kubeconfig changes it will trigger a replacement of all kubernetes resources

This is talking about the exact issue:
https://github.com/pulumi/pulumi/issues/9397
TODO

[x] Update command rule
[ ] Test provisioner provision using docker target
[ ] Setup Teleport on provisioner
[ ] Setup Teleport machine ID for BuildBuddy
[ ] Setup Bazel command to login to Teleport before executing Pulumi
[ ] Setup Pulumi test rule in BuildBuddy and figure out if this can be rendered in GitHub
[ ] Setup Pulumi deploy rule in BuildBuddy

Instead of using SSH port forwarding use Teleport to manage access to all services (https://goteleport.com/).

Split into separate issues.


Problem with KAZESample in Unity

Hello,
I tried to use KAZE in my Unity project but I always got this error.
'ArrayTypeMismatchException: Source array type cannot be assigned to destination array type.
(wrapper stelemref) object:stelemref (object,intptr,object)
System.Collections.Generic.Dictionary2[System.Type,OpenCvSharp.Ptr1+ReleaseFunc[OpenCvSharp.KAZE]].Add (System.Type key, OpenCvSharp.ReleaseFunc value) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:429)
OpenCvSharp.Ptr1[OpenCvSharp.KAZE]..cctor () Rethrow as TypeInitializationException: An exception was thrown by the type initializer for OpenCvSharp.Ptr1
OpenCvSharp.KAZE..ctor (IntPtr p)
OpenCvSharp.KAZE.Create (Boolean extended, Boolean upright, Single threshold, Int32 nOctaves, Int32 nOctaveLayers, KAZEDiffusivity diffusivity)
Test.Start () (at Assets/Test.cs:24)'
when var kaze = KAZE.Create(); and var akaze = AKAZE.Create(); are called. I can't find how to solve this yet.

Sorry but it is difficult to support Unity. Please consider using OpenCV for Unity (https://www.assetstore.unity3d.com/en/#!/content/21088).


[ᚬmaster] Rc/v0.12.1

update the example of sending transactions to make it more clear.
set default address prefix to ckt instead of ckb, and expose address configuration setter in the core.generateAddress method.
fix typo in the docs.
add private key and lerna tool guide in the docs.
use TextEncoder and TextDecoder from the global object if possible.
update system cell info test cases according to the testnet.
publish rc/v0.12.1

Codecov Report

Merging #219 into master will not change coverage.
The diff coverage is 83.33%.

@@           Coverage Diff           @@
##           master     #219   +/-   ##
=======================================
  Coverage   95.58%   95.58%
=======================================
  Files           9        9
  Lines         272      272
  Branches       65       67    +2
=======================================
  Hits          260      260
  Misses         11       11
  Partials        1        1

Impacted Files
Coverage Δ

packages/ckb-sdk-utils/src/index.ts
100% <100%> (ø)
:arrow_up:

packages/ckb-sdk-utils/src/address/index.ts
94.28% <66.66%> (ø)
:arrow_up:

Continue to review full report at Codecov.

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


Development environment with hot reloading

fix https://github.com/src-d/sourced-ce/issues/26
blocked by https://github.com/src-d/sourced-ce/pull/158
The current way to develop the UI is very painful:

make build takes ~10 mins every time you run it after changing some CSS line (because it ruins the cached docker context)
the official way is not clearly documented and is affected by the changes we made in superset because source{d} CE. It is needed extra wiring to run it.

This PR proposes a new way to run an environment for development (in MacOS and Linux), running (see docs in the CONTRIBUTING.md):
$ make dev-prepare
$ sourced init local

If it is done in that way, the env takes ~2mins to be ready, and every hot-reload takes ~5sec or less.
TL;DR

You'll find below the rationale behind the decision made.
Core changes in this PR

df32684a7 Configure development environment with hot reloading
f8a179416 Polish README.md, moving info to CONTRIBUTING.md

Some other things that could be done in a separated PR if you prefer so:

bf031f384 Remove make dev-patch; I didn't find a use-case now that we have this, wdyt?
8f27929a1k,. Restore superset/contrib/docker/docker-init.sh (unused since we joined init scripts)

More info
When incubator-superset is ran in development mode, it's usually started with local directories bound to some internal paths. Content from volumes —in linux—, is owned by the user from the host machine.
Since the incubator-superset container is built to be run with superset user, content from volumes might be not writable because superset user is not the owner of those mounted dirs (as described by https://github.com/apache/incubator-superset/issues/6887).
Alternatives:
Run incubator-superset as root:

since it's not the expected way to run superset, it can be unexpected,
data which is written in the volumes (as node_modules or __pycache__) will be written as root, so it won't be writable from the host machine (without being root)

Run incubator-superset container as root, but run incubator-superset app with the user owning the bound data; to do so:

assumption: all the bound data is owned by the same user.
Change the UID of superset, to the UID of the owner of the bound data.
Make sure the entrypoint is run by superset user, owning the original container data and the data bound to directories in the host machine.
All the data written by superset, will use the UID of the user of the host, so it will be writable also by that user in the host.

Docker loads (by default) an extra docker-compose.override.yml file (docs multiple-compose-files), with that in mind, we can extend our official docker-compose.yml file with our custom config to let the user run source{d} CE in development mode with hot reloading.

I tested an initial version of this PR in MacOS successfully, but I need to try again the chmod thing.
I will try it and confirm it here when done.

@ricardobaeta this version should be way easier to run than the one you tried some weeks ago.

I tested make dev-prepare in OSX and it's now working there thanks to 1eff7f6

Avoid UID hack on OSX -> as described in PR desc, there's no problem with UID on OSX
Replace sed with awk -> because arguments in BSD sed and GNU sed are different
Adapt how stat command is formatted in BSD
Adapt how the colors are requested in BSD and GNU echo

This is now ready for final validation @src-d/applications

Thanks, @carlosms
your suggestions were addressed by 22e22a29163ba8a168ffbb256d8a11aeedf5aa8d


Document how to run NuGet concurrently

Motivation from https://github.com/NuGet/Home/issues/7380
Specifically, nuget operations will run concurrently as long as they are sharing the same temp folder.
Any overlaps among projects can still cause issues though.

@nkolev92 - can you please help us with a PR.

Any overlaps among projects can still cause issues though.

I wonder if you could explain this part a bit- what kind of overlaps cause trouble?


[Help Wanted] NL Constraints

Hello, I'm just checking to see whether using @NLconstraints/@NLoptimize is possible in infinite opt? If so, is there an example in any of the documentation? I didn't find any.
The following thread: https://github.com/pulsipher/InfiniteOpt.jl/issues/16 suggests that it was in the cards at some point, but unsure if it was ever fully developed.
The code I'm trying to write includes the following constraints:

@constraint(m, p == min(p_bar, max(zeros(N), transpose(A)*p + c - x)))

which causes an error presumably because of the use of min/max. The error is: MethodError: no method matching isless(::GenericQuadExpr{Float64,GeneralVariableRef}, ::Float64)
Closest candidates are:
isless(!Matched::Float64, ::Float64) at float.jl:465
isless(!Matched::Missing, ::Any) at missing.jl:87
isless(!Matched::AbstractFloat, ::AbstractFloat) at operators.jl:156
...
The second constraint is:
prob(x,c,w) = 1 ./(1 .+exp.(-1000*(x.*c-w))) # approximates indicator function of x*c>=w
JuMP.register(m, :prob, 3, prob)
for i = 1:N
    @NLconstraint(m, delta[i] = prob(x[i],c[i],w[i]))
end

This gives the error: MethodError: no method matching register(::InfiniteModel, ::Symbol, ::Int64, ::typeof(prob)). So I assume there's no ability for users to define functions in constraints.
The other way I try to define this constraints:
for i = 1:N
    @NLconstraint(m, delta[i] == 1 ./(1 .+exp.(-1000*(x[i].*c[i]-w[i])))) #ensuring prob x*c >= w = delta
end

This gives the error: MethodError: no method matching _init_NLP(::InfiniteModel)
Thank you,

Hi there!
InfiniteOpt.jl does not currently support general nonlinear expressions (e.g., NLconstraints) like JuMP. The details of what expressions are accepted are given on https://pulsipher.github.io/InfiniteOpt.jl/dev/guide/expression/. This limitation is due to JuMP's nonlinear interface being nonextendable for packages like this one (see https://github.com/jump-dev/JuMP.jl/issues/2402). JuMP NLP won't be extendable until it is fundamentally redone via https://github.com/jump-dev/MathOptInterface.jl/issues/846 (maybe in 2-3 years).
However, in accordance with #16, I do plan on implementing our own NLP interface from the ground up (aiming at sometime this year) since JuMP is a ways out, but this will require a significant amount of work.
Regarding your above code:

Your first constraint would need to be a @NLconstraint in JuMP anyway since @constraint only supports linear and quadratic expressions (not min and max). However, the max operator can be reformulated via traditional linear programming reformulations (i.e., introducing an auxiliary variable with inequality constraints).
Your indicator function could be approximated via big-M constraints (i.e., using binary variables) and thus avoid the need for nonlinear expressions.

If we want the constraint Prob(f(ξ) <= 0) <= δ (a chance constraint where f denotes the RHS function) we can equivalently represent it Expectation[indicator_(f(ξ) <= 0)(ξ)] <= δ. This can in turn be represented by big-M constraints (introducing an infinite variable y(ξ) in {0,1} for the indicator function and a sufficiently large scalar constant M). For example, if f(ξ) := w(ξ) - c * x(ξ) then in InfiniteOpt.jl we can do the following:
using JuMP, InfiniteOpt
c = 42 # whatever it is
δ = 0.95 # whatever it is
M = 1000 # a sufficient upper bound to relax the constraints
m = InfiniteModel()
@infinite_parameter(m, ξ in Normal(0, 1), num_supports = 1000)
@infinite_variable(m, w(ξ))
@infinite_variable(m, x(ξ))
@infinite_variable(m, y(ξ), Bin) # for the indicator function
@constraint(m, big_m_constr, w - c * x <= y * M)
@constraint(m, probabilistic_constr, expect(1 - y, ξ) <= δ)

Hi there!
InfiniteOpt.jl does not currently support general nonlinear expressions (e.g., NLconstraints) like JuMP. The details of what expressions are accepted are given on https://pulsipher.github.io/InfiniteOpt.jl/dev/guide/expression/. This limitation is due to JuMP's nonlinear interface being nonextendable for packages like this one (see https://github.com/jump-dev/JuMP.jl/issues/2402). JuMP NLP won't be extendable until it is fundamentally redone via https://github.com/jump-dev/MathOptInterface.jl/issues/846 (maybe in 2-3 years).
However, in accordance with #16, I do plan on implementing our own NLP interface from the ground up (aiming at sometime this year) since JuMP is a ways out, but this will require a significant amount of work.
Regarding your above code:

Your first constraint would need to be a @NLconstraint in JuMP anyway since @constraint only supports linear and quadratic expressions (not min and max). However, the max operator can be reformulated via traditional linear programming reformulations (i.e., introducing an auxiliary variable with inequality constraints).
Your indicator function could be approximated via big-M constraints (i.e., using binary variables) and thus avoid the need for nonlinear expressions.

If we want the constraint Prob(f(ξ) <= 0) <= δ (a chance constraint where f denotes the RHS function) we can equivalently represent it Expectation[indicator_(f(ξ) <= 0)(ξ)] <= δ. This can in turn be represented by big-M constraints (introducing an infinite variable y(ξ) in {0,1} for the indicator function and a sufficiently large scalar constant M). For example, if f(ξ) := w(ξ) - c * x(ξ) then in InfiniteOpt.jl we can do the following:
using JuMP, InfiniteOpt
c = 42 # whatever it is
δ = 0.95 # whatever it is
M = 1000 # a sufficient upper bound to relax the constraints
m = InfiniteModel()
@infinite_parameter(m, ξ in Normal(0, 1), num_supports = 1000)
@infinite_variable(m, w(ξ))
@infinite_variable(m, x(ξ))
@infinite_variable(m, y(ξ), Bin) # for the indicator function
@constraint(m, big_m_constr, w - c * x <= y * M)
@constraint(m, probabilistic_constr, expect(1 - y, ξ) <= δ)

How would you do the first constraint with the min/max. I tried defining boundary conditions, but that kept erroring (I think it's because I can only define boundary conditions with respect to the infinite parameter, not with respect to other variables).
for i = 1:N
   @BDconstraint(m, ((transpose(A)*p+c-x)[i] in [-1000000.0,-1e-16]), p[i] == 0) # transpose(A) * p + c -x <= 0
   @BDconstraint(m, ((transpose(A)*p+c-x)[i] in [0.0, p_bar[i]]), p[i] == (transpose(A)*p+c-x)[i])
 @BDconstraint(m, ((transpose(A)*p+c-x)[i] in [p_bar[i]+1e-9, 1000000.0]), p[i] == p_bar[i])
end

For the probability aspect, when I incorporate why you suggested, I get the following error:
MathOptInterface.UnsupportedConstraint{MathOptInterface.SingleVariable,MathOptInterface.ZeroOne}: MathOptInterface.SingleVariable-in-MathOptInterface.ZeroOne constraint is not supported by the model.
Any thoughts? Thank you very much!

How would you do the first constraint with the min/max. I tried defining boundary conditions, but that kept erroring (I think it's because I can only define boundary conditions with respect to the infinite parameter, not with respect to other variables).
for i = 1:N
   @BDconstraint(m, ((transpose(A)*p+c-x)[i] in [-1000000.0,-1e-16]), p[i] == 0) # transpose(A) * p + c -x <= 0
   @BDconstraint(m, ((transpose(A)*p+c-x)[i] in [0.0, p_bar[i]]), p[i] == (transpose(A)*p+c-x)[i])
 @BDconstraint(m, ((transpose(A)*p+c-x)[i] in [p_bar[i]+1e-9, 1000000.0]), p[i] == p_bar[i])
end

For the probability aspect, when I incorporate why you suggested, I get the following error:
MathOptInterface.UnsupportedConstraint{MathOptInterface.SingleVariable,MathOptInterface.ZeroOne}: MathOptInterface.SingleVariable-in-MathOptInterface.ZeroOne constraint is not supported by the model.
Any thoughts? Thank you very much!

With respect to the use of @BDconstraint it corresponds to bounded constraints which are constraints over some sub-domain of the overall infinite domain which is parameterized by infinite parameters. Thus, the second argument specifies the sub-domain in terms of the infinite parameter(s) and the third argument specifies the constraint that will be enforced over that sub-domain. For example, consider the following time valued illustration:
using JuMP, InfiniteModel
m = InfiniteModel()
@infinite_parameter(m, t in [0, 10]) # overall time domain (infinite domain) is the interval [0, 10]
@infinite_variable(m, x(t)) # define some time variable

@constraint(m, x <= 42) # this will be enforced over the entirety of the infinite domain (i.e., t in [0, 10])
@BDconstraint(m, t in [0, 10], x <= 42) # equivalent to above with @constraint since [0, 10] is the full domain
@BDconstraint(m, t == 0, x ==5) # this will only be enforced over the subdomain t in [0, 0] (a subset of [0, 10])
@BDconstraint(m, t in [2, 5], x^2 <= 9) # this constraint will only be enforced over the subdomain t in [2, 5]

Thus, @BDconstraint exists to limit the scope of a particular constraint with respect to its infinite domain dependencies.
With respect to your min-max constraint, my intuition is that it can probably be reformulated into a more convenient form when the entire optimization problem is considered. I am not exactly sure what overall formulation you are tackling, but I am guessing there might be a way to drop the min operator and then only have to deal with the max operator which is straightforward to reformulate if the objective is minimizing.  I don't quite follow the reformulation you are attempting above, but the error is due to the nature of what bounded constraints are in accordance with my conversation above. If you can get it in a form with only the max operator then we can reformulate it as follows:
using JuMP, InfiniteOpt, Distributions
m = InfiniteModel()
@infinite_parameter(m, ξ in Normal(0, 1), num_supports = 1000)
@infinite_variable(m, x(ξ))

# Enforce the constraint max(42, x) <= 80
@infinite_variable(m, z(ξ)) # auxiliary variable to represent max(42, x)
@constraint(m, z >= 42) # helps characterize the auxiliary variable
@constraint(m, z >= x) # helps characterize the auxiliary variable
@constraint(m, z <= 80) # defines the constraint we wanted with the max operator

Finally, the MOI error is due to your choice of optimizer (solver). This is because the big-M constraint reformulation uses binary variables and you'll need to use an appropriate mixed-integer solver. Depending on the rest of the model, you could probably use Gurobi, Cplex, or Cbc.

With respect to the use of @BDconstraint it corresponds to bounded constraints which are constraints over some sub-domain of the overall infinite domain which is parameterized by infinite parameters. Thus, the second argument specifies the sub-domain in terms of the infinite parameter(s) and the third argument specifies the constraint that will be enforced over that sub-domain. For example, consider the following time valued illustration:
using JuMP, InfiniteModel
m = InfiniteModel()
@infinite_parameter(m, t in [0, 10]) # overall time domain (infinite domain) is the interval [0, 10]
@infinite_variable(m, x(t)) # define some time variable

@constraint(m, x <= 42) # this will be enforced over the entirety of the infinite domain (i.e., t in [0, 10])
@BDconstraint(m, t in [0, 10], x <= 42) # equivalent to above with @constraint since [0, 10] is the full domain
@BDconstraint(m, t == 0, x ==5) # this will only be enforced over the subdomain t in [0, 0] (a subset of [0, 10])
@BDconstraint(m, t in [2, 5], x^2 <= 9) # this constraint will only be enforced over the subdomain t in [2, 5]

Thus, @BDconstraint exists to limit the scope of a particular constraint with respect to its infinite domain dependencies.
With respect to your min-max constraint, my intuition is that it can probably be reformulated into a more convenient form when the entire optimization problem is considered. I am not exactly sure what overall formulation you are tackling, but I am guessing there might be a way to drop the min operator and then only have to deal with the max operator which is straightforward to reformulate if the objective is minimizing.  I don't quite follow the reformulation you are attempting above, but the error is due to the nature of what bounded constraints are in accordance with my conversation above. If you can get it in a form with only the max operator then we can reformulate it as follows:
using JuMP, InfiniteOpt, Distributions
m = InfiniteModel()
@infinite_parameter(m, ξ in Normal(0, 1), num_supports = 1000)
@infinite_variable(m, x(ξ))

# Enforce the constraint max(42, x) <= 80
@infinite_variable(m, z(ξ)) # auxiliary variable to represent max(42, x)
@constraint(m, z >= 42) # helps characterize the auxiliary variable
@constraint(m, z >= x) # helps characterize the auxiliary variable
@constraint(m, z <= 80) # defines the constraint we wanted with the max operator

Finally, the MOI error is due to your choice of optimizer (solver). This is because the big-M constraint reformulation uses binary variables and you'll need to use an appropriate mixed-integer solver. Depending on the rest of the model, you could probably use Gurobi, Cplex, or Cbc.

I see what you are saying. I guess my problem is a little more involved than the example and for that reason I'm unsure how to connect the two. Mainly because my constraint is w == max(42,x) where w is a variable in my model rather than a constant. I don't see how you can define that using the auxiliary variable method.

That is not a problem at all. To formulate the constraint w(ξ) = max(42, x(ξ)) we do the following:
using JuMP, InfiniteOpt, Distributions
m = InfiniteModel()
@infinite_parameter(m, ξ in Normal(0, 1), num_supports = 1000)
@infinite_variable(m, x(ξ))
@infinite_variable(m, w(ξ))

# Enforce the equivalent set of constraints
@infinite_variable(m, z(ξ)) # auxiliary variable to represent max(42, x)
@constraint(m, z >= 42) # helps characterize the auxiliary variable
@constraint(m, z >= x) # helps characterize the auxiliary variable
@constraint(m, w == z) # defines the constraint we wanted with the max operator

Since w = z, this can be further simplified to:
using JuMP, InfiniteOpt, Distributions
m = InfiniteModel()
@infinite_parameter(m, ξ in Normal(0, 1), num_supports = 1000)
@infinite_variable(m, x(ξ))
@infinite_variable(m, w(ξ))

# Enforce the equivalent set of constraints
@constraint(m, w >= 42)
@constraint(m, w >= x)

using JuMP, InfiniteOpt, Distributions
m = InfiniteModel()
@infinite_parameter(m, ξ in Normal(0, 1), num_supports = 1000)
@infinite_variable(m, x(ξ))
@infinite_variable(m, w(ξ))

# Enforce the equivalent set of constraints
@infinite_variable(m, z(ξ)) # auxiliary variable to represent max(42, x)
@constraint(m, z >= 42) # helps characterize the auxiliary variable
@constraint(m, z >= x) # helps characterize the auxiliary variable
@constraint(m, w == z) # defines the constraint we wanted with the max operator

There are many values of z that satisfy the constraints z >= 42 and z >= x. One of them is z = max(42,x). However, if x is 50, the value z = 60 would satisfy those constraints. To me this doesn't ensure that z = max(42,x), just that z is greater than both 42 and x. Am I missing something?

This reformulation depends on the objective function. If the objective will tend for z to be minimized then this reformulation is exact. Otherwise, it can be reformulated by introducing a binary variable. Again, this is all better explained in detail here https://math.stackexchange.com/questions/2446606/linear-programming-set-a-variable-the-max-between-two-another-variables (you can also refer to linear programming materials). Without knowing your full formulation, I cannot determine which reformulation will suit your situation.

Ah, this makes so much more sense. Thank you.

@smitch151 If there are no further questions, would you mind me closing this issue?

Seeing that the immediate issue is resolved, I will close this issue. Further discussion about the development of the NLP interface can be made in #16.

I'm trying to revisit in a simple case. Let's say I want to have the constraint p == min(A*x, p_bar).
From my understanding of the Big M stuff you described, I need four constraints:

p <= A*x
p <= p_bar
p >= Ax - Mind
p >= p_bar - M*ind

where ind = 1 when p_bar < A*x.
When I try to code this up I get the following error: "MethodError: no method matching isless(::GenericAffExpr{Float64,GeneralVariableRef}, ::Float64)"
How can I generate this indicator to do this comparison.
using Pkg
Pkg.add(Pkg.PackageSpec(;name="InfiniteOpt", version="0.3.2"))

using LinearAlgebra, JuMP, Ipopt, Distributions, Random
using InfiniteOpt

N = 2
p_bar = [5.0, 5.0]
A = [1.0 1.0; 2.0 2.0]

# Setting up model
m = InfiniteModel(Ipopt.Optimizer);

# Parameter everything depends upon (shocks to each node)
@infinite_parameter(m, x[i=1:N] in Beta(1.0,50.0), num_supports = 10000) #parameter of shocks

# setting up variables, starting positino, and constraints
@infinite_variable(m, p[i=1:N](x), start = 0) # clearing vector.

# setting up constraint
#@constraint(m, p == min(A*x, p_bar))
M = 100
@infinite_variable(m, ind[i=1:N](x), Bin) #ind indicates if p_bar>x
ind .== (p_bar .>= A * x)
@constraint(m, p .<= A*x)
@constriant(m, p .<= p_bar)
@constraint(m, p .>= A* x - M.*ind)
@constraint(m, p .>= p_bar - M.*(1-ind))

@objective(m, Min, expect(sum(x.*p),x)) # min/max E[(ci * xi + p_bar i - pi(x)))]

# Training Model
@time optimize!(m);

Once again, thank you.

The error is occurring since the comparison syntax p_bar .>= A * x is only valid inside @constraint to define constraints as per typical JuMP syntax.
Your reformulation doesn't appear to be correct. Would you please algebraically define the optimization problem you are trying to solve before any reformulation is applied to it and also label each symbol as a constant, infinite parameter, or infinite variable (perhaps this could be provided via a short attachment). Once, I better understand the full problem you are trying to solve, I should be better able to help you. This sounds like an interesting application class.

Okay I'll try to explain more fully.
We want to maximize the expected value of p.x subject to the constraint that p == min(Ax, p_bar) where x is drawn from a beta distribution. The complication comes from the fact that we can't just use a minimum function in infinite opt, so we need to use big M to get around it. The big M specification of C == min(A,B) is:

C <= A
C <= B (this ensures that C is smaller than the smallest element of A and B.
However C could still be -1000 if A and B == 0 which isn't right. So, we create and indicator which equals 1 when B >= A and 0 otherwise.
C >= A - M*(1-ind)
C >= B - M * ind
Now, if B>= A we need C == A as our solution. This occurs because in that case ind == 1 so C>= A - M*(1-ind) = A.
If B < A, we need C == B as our solution. This occurs because in that case ind == 0. so C >= B- M*ind = B.

I updated the code your @constraint comment. I think I have the formulation of the big M aspect right in the code.
However, I still get the error "MethodError: no method matching isless(::GenericAffExpr{Float64,GeneralVariableRef}, ::Float64)" when I do the comparison in the @constraint.
using Pkg
Pkg.add(Pkg.PackageSpec(;name="InfiniteOpt", version="0.3.2"))

using LinearAlgebra, JuMP, Ipopt, Distributions, Random
using InfiniteOpt

N = 2
p_bar = [5.0, 2.0]
A = [3.0 10.0; 10.0 3.0]

# Setting up model
m = InfiniteModel(Ipopt.Optimizer);

# Parameter everything depends upon (shocks to each node)
@infinite_parameter(m, x[i=1:N] in Beta(1.0,50.0), num_supports = 10000) #parameter of shocks

# setting up variables, starting positino, and constraints
@infinite_variable(m, p[i=1:N](x), start = 0) # clearing vector.

# setting up constraint
#@constraint(m, p == min(A*x, p_bar))
M = 100
@infinite_variable(m, ind[i=1:N](x), Bin) #ind indicates if p_bar>x
@constraint(m, ind .== (p_bar .>= A*x))
@constraint(m, p .<= A*x)
@constraint(m, p .<= p_bar)
@constraint(m, p .>= A*x .- M .*ind )
@constraint(m, p .>= p_bar .- M.*(1 .- ind))

@objective(m, Min, expect(sum(x.*p),x)) # min/max E[(ci * xi + p_bar i - pi(x)))]

# Training Model
@time optimize!(m);

If I create an arbitrary variable w, with the same dimensions as x, the code works just fine. Also, I did need to switch the indicator direction you were correct about that. Good catch. Is there anyway to do this with x the infinite parameter rather than just some vector?
using LinearAlgebra, JuMP, Distributions, Random
using InfiniteOpt
using Cbc, Ipopt

N = 2
p_bar = [5.0, 5.0]
A = [3.0 10.0; 10.0 3.0]
w = [0.0; 1.0]

# Setting up model
m = InfiniteModel(Cbc.Optimizer);

# Parameter everything depends upon (shocks to each node)
@infinite_parameter(m, x[i=1:N] in Beta(1.0,50.0), num_supports = 10000) #parameter of shocks

# setting up variables, starting positino, and constraints
@infinite_variable(m, p[i=1:N](x), start = 0) # clearing vector.

# setting up constraint
#@constraint(m, p == min(A*x, p_bar))
M = 100
@infinite_variable(m, ind[i=1:N](x), Bin) #ind indicates if p_bar>x
@constraint(m, ind .== (p_bar .>= A*w))
@constraint(m, p .<= A*w)
@constraint(m, p .<= p_bar)
@constraint(m, p .>= A*w .- M .* (1 .- ind))
@constraint(m, p .>= p_bar .- M.*ind)

@objective(m, Min, expect(sum(x.*p),x)) # min/max E[(ci * xi + p_bar i - pi(x)))]

# Training Model
@time optimize!(m);

'''

Also this issue occurs if x is an infinite variable, not just when x is an infinite parameter. For the problem I'm trying to solve x should be an infinite parameter, but just wondering if that helps you understand it.

First, the syntax @constraint(m, ind .== (p_bar .>= A*x)) is incorrect since @constraint is not meant contain more than one operator, but this contains 2 (.== and .>=). The reason it happens to work with w is that (p_bar .>= A*w) evaluates to an array of booleans since it contains no model variables or parameters. We do not currently provide a native symbolic indicator function which is what I think you are trying to accomplish here. But one can incorporate big-M based reformulations to handle indicator functions via reformulation as I showed before.
Let's return to problem you want to solve. If I understand correctly, your desired formulation is:
max 𝔼[p(x)' x]
s.t. p(x) = min(Ax, p_bar), ∀ x ∈ X  (where X is the co-domain of the beta distribution)
where p(x) is a vector of infinite variables, x is a vector of beta random infinite parameters, A is matrix of constants, and p_bar is a vector of constants. This actually doesn't need to be posed as an optimization problem since there are no degrees of freedom (i.e., p(x) is constrained to one possible form by the constraint).
Let's first ignore the last observation and model this as an optimization problem. This actually doesn't require the introduction of big-M constraints to handle the min because none of its inputs are decision variables, it is just a function of infinite parameters x. This means that once we generate samples for x the min function will evaluate to a constant (not containing any decision variables). Thus, we can employ an infinite_parameter_function from InfiniteOpt to represent it (see https://pulsipher.github.io/InfiniteOpt.jl/stable/guide/expression/#Infinite-Parameter-Functions). With this observation, let's formulate the problem in InfiniteOpt!
using InfiniteOpt, JuMP, Clp, Distributions, Random, LinearAlgebra
using JuMP.Containers: @container # convenient for infinite parameter functions

Random.seed!(42) # seed to reproduce same samples for the sake of example

N = 2
p_bar = [5.0, 5.0]
A = [3.0 10.0; 10.0 3.0]

# Initialize the  model
m = InfiniteModel(Clp.Optimizer)

# Define the random parameters
@infinite_parameter(m, x[i=1:N] in Beta(1.0, 50.0), num_supports = 1000)

# Define the decision variables
@infinite_variable(m, p[i=1:N](x), start = 0)

# Define the infinite parameter function for each element of min(Ax, p_bar)
@container(my_func[i = 1:N], parameter_function(x_sample -> min((A * x_sample)[i], p_bar[i]), x))

# Define the objective
@objective(m, Min, expect(p' * x, x))

# Define the constraints
@constraint(m, p .== my_func)

# Optimize the model (i.e., discretize and solve the model)
optimize!(m)

# Get results
println("Objective value: ", objective_value(m))
println("Values of p(x): ", value.(p))

Notice in the above that p(x) = my_func, so we can equivalently formulate:
using InfiniteOpt, JuMP, Clp, Distributions, Random, LinearAlgebra
using JuMP.Containers: @container # convenient for infinite parameter functions

Random.seed!(42) # seed to reproduce same samples for the sake of example

N = 2
p_bar = [5.0, 5.0]
A = [3.0 10.0; 10.0 3.0]

# Initialize the  model
m = InfiniteModel(Clp.Optimizer)

# Define the random parameters
@infinite_parameter(m, x[i=1:N] in Beta(1.0, 50.0), num_supports = 1000)

# Define the infinite parameter function for each element of min(Ax, p_bar)
@container(my_func[i = 1:N], parameter_function(x_sample -> min((A * x_sample)[i], p_bar[i]), x))

# Define the objective
@objective(m, Min, expect(my_func' * x, x))

# Optimize the model (i.e., discretize and solve the model)
optimize!(m)

# Get results
println("Objective value: ", objective_value(m))

Now we readily see that our model contains no decision variables which backs up our original observation that this need not be an optimization problem since it has no degrees of freedom. Thus, we can forego the optimization and just compute the expectation directly using sample average approximation to obtain the same answer.
using Distributions, LinearAlgebra, Random

Random.seed!(42)

N = 2
S = 1000 # number of samples
p_bar = [5.0, 5.0]
A = [3.0 10.0; 10.0 3.0]

# Define the distribution and get the samples
dist = Beta(1.0, 50.0)
x = hcat([rand(dist, S) for i = 1:N]...)

# Compute the expectation via sample average approximation
my_func(x_sample) = [min((A * x_sample)[i], p_bar[i]) for i = 1:N]
objective = 1 / S * sum(my_func(x[s, :])' * x[s, :]  for s = 1:S)

# Get results
println("Objective value: ", objective)

I hope that helps.

This is fantastic. Thank you so much. One, hopefully final, question:
What's the syntax if I want to make A a variable in my model, rather than some external variable, but still want the same container function?
i,e.
using InfiniteOpt, JuMP, Clp, Distributions, Random, LinearAlgebra
using JuMP.Containers: @container # convenient for infinite parameter functions

Random.seed!(42) # seed to reproduce same samples for the sake of example

N = 2
p_bar = [5.0, 5.0]
A = [3.0 10.0; 10.0 3.0]

# Initialize the  model
m = InfiniteModel(Clp.Optimizer)

# Define the random parameters
@infinite_parameter(m, x[i=1:N] in Beta(1.0, 50.0), num_supports = 1000)

# Define A as a variable in the model:
@hold_variable(m, A[i=1:N, j=1:N] >= 0)

# Define the infinite parameter function for each element of min(Ax, p_bar)
@container(my_func[i = 1:N], parameter_function(x_sample -> min((A * x_sample)[i], p_bar[i]), x))

Glad to be of help.
First, as a clarification the @container macro is just a convenient tool for constructing arrays and has nothing specifically to do with infinite parameter functions.
using JuMP.Containers: @container

# Make a vector `a` where each element is `i + 2`
@container(a[i = 1:10], i + 2)

# The above is equivalent to
a = Vector{Int}(undef, 10) # preallocate the array
for i = 1:10
    a[i] = i + 2
end

Now let's consider you problem where the A matrix is considered to be a nonnegative matrix of finite decision variables (i.e., first-stage variables in this context).
max  𝔼_x[min(Ax, p_bar)'x]
 A
s.t. A >= 0

Here, we can no longer use parameter_function in InfiniteOpt to handle min(Ax, p_par) since it now contains decision variables A (infinite parameter functions can only contain infinite parameters and constants). However, the good news is this formulation amounts to a variant of a maximin problem which means we can reformulate the min(Ax, p_par) by introducing a continuous variable z(x) and adding some inequality constraints:
 max   𝔼_x[z(x)'x]
A,z(x)
 s.t.  z(x) <= Ax,    ∀ x ∈ X
       z(x) <= p_bar, ∀ x ∈ X
       A >= 0

This reformulation is exact since the objective wants to make z(x) as large as possible, but this is limited by Ax and p_bar (whichever is smaller). The piece of good news is that this formulation is linear! Thus, we can readily implement this in InfiniteOpt:
using InfiniteOpt, JuMP, Clp, Distributions, LinearAlgebra

# Define the constants
N = 2
p_bar = [5.0, 5.0]

# Initialize the  model
m = InfiniteModel(Clp.Optimizer)

# Define the random parameters
@infinite_parameter(m, x[i=1:N] in Beta(1.0, 50.0), num_supports = 1000)

# Define A as a matrix of variables:
@hold_variable(m, A[i=1:N, j=1:N] >= 0)

# Define the reformulation infinite variables z(x)
@infinite_variable(m, z[1:2](x))

# Define the objective
@objective(m, Max, expect(z' * x, x))

# Define the constraints
@constraint(m, z .<= A * x)
@constraint(m, z .<= p_bar)

# Solve the model and get the results
optimize!(m)
opt_objective = objective_value(m)
opt_A = value.(A)

Hope that helps!

Thank you. This is all very helpful. I'm beginning to understand it. What if we are trying to minimize, so that "this reformulation is exact since the objective wants to make z(x) as large as possible, but this is limited by Ax and p_bar (whichever is smaller)." is not satisfied.
i.e.
using InfiniteOpt, JuMP, Clp, Distributions, LinearAlgebra

# Define the constants
N = 2
p_bar = [5.0, 5.0]

# Initialize the  model
m = InfiniteModel(Clp.Optimizer)

# Define the random parameters
@infinite_parameter(m, x[1:N] in Beta(1.0, 50.0), num_supports = 1000)

# Define A as a matrix of variables:
@hold_variable(m, A[1:N, 1:N] >= 0)

# Define the reformulation infinite variables z(x)
@infinite_variable(m, z[1:N](x))

# Define the objective
@objective(m, Min, expect(z' * x, x))

# Define the constraints
#@constraint(m, z == min(A*x, p_bar))
@constraint(m, z .<= A * x)
@constraint(m, z .<= p_bar)

# Solve the model and get the results
optimize!(m)
opt_objective = objective_value(m)
opt_A = value.(A)

The optimizer runs, but it says the problem is unbounded as expected.

The previous reformulation indeed is no longer exact for a minimization problem. For such a problem, we need to introduce binary variables y(x) with a sufficiently large constant M:
   max     𝔼_x[z(x)'x]
A,z(x),y(x)
   s.t.    z(x) <= Ax,                ∀ x ∈ X
           z(x) <= p_bar,             ∀ x ∈ X
           y(x) >= Ax - My(x),        ∀ x ∈ X
           y(x) >= Ax - M(1 - y(x)),  ∀ x ∈ X
           y(x) ∈ {0, 1},             ∀ x ∈ X
           A >= 0

So InfiniteOpt we have:
using InfiniteOpt, JuMP, Cbc, Distributions, LinearAlgebra

# Define the constants
N = 2
p_bar = [5.0, 5.0]
M = 1000 # replace with an appropriate value

# Initialize the  model
m = InfiniteModel(Cbc.Optimizer) # Gurobi would be much faster

# Define the random parameters
@infinite_parameter(m, x[1:N] in Beta(1.0, 50.0), num_supports = 1000)

# Define A as a matrix of variables:
@hold_variable(m, A[1:N, 1:N] >= 0)

# Define the reformulation infinite variables z(x) and y(x)
@infinite_variable(m, z[1:N](x))
@infinite_variable(m, y[1:N](x), Bin)

# Define the objective
@objective(m, Max, expect(z' * x, x))

# Define the constraints
@constraint(m, z .<= A * x)
@constraint(m, z .<= p_bar)
@constraint(m, z .>= A * x - M * y)
@constraint(m, z .>= p_bar - M * (1 - y))

# Solve the model and get the results
optimize!(m)
opt_objective = objective_value(m)
opt_A = value.(A)

Note that we now have a MILP and that it will scale exponentially in complexity with num_supports due to the creation of more and more binary variables (so this may become intractable as we use a large amount of supports). Also, this problem will be infeasible if M is too small, but will get harder and harder to solve for excessively large values of M.

Has a follow-up, full nonlinear support beyond what JuMP does was added in v0.5.0 via #161.


model download fails with no space left on device while having 19G of free space

Describe the bug
I was downloading the default mixtral 8x7b model from registry.rh.io and was surprised to get the no space left on device message while still having 19 gigabytes of free space.
This is an EC2 instance, EBS volume - I'd love to know how much to add for the download process to complete.
It would also be amazing if ilab did some investigation beforehand and refused a download if there is not enough space available.
[root@pytorch /]# ilab model download --repository docker://registry.redhat.io/rhelai1/mixtral-8x7b-instruct-v0-1 --release 1.1
Downloading model from OCI registry<EMAIL_ADDRESS>to /opt/app-root/src/.cache/instructlab/models...
Copying blob 54669c5aec29 [=====================>----------------] 2.7GiB / 4.6GiB | 211.8 MiB/s
Copying blob d0b63fca793c [=====================>----------------] 2.7GiB / 4.6GiB | 230.6 MiB/s
Copying blob 9d56d04b36d0 done   |
Copying blob 801135aff52b done   |
Copying blob 54669c5aec29 done   |
Copying blob d0b63fca793c done   |
Copying blob 9d56d04b36d0 done   |
Copying blob 801135aff52b done   |
Copying blob 40e6ecbcedfc done   |
Copying blob 29e15364d8ab done   |
Copying blob 67e0596920fe done   |
Copying blob e330eabd70b4 done   |
Copying blob 048fa5347877 done   |
Copying blob 83bfed6169c1 done   |
Copying blob af316ad78402 done   |
Copying blob 5882e4366c63 done   |
Copying blob 77813d1dbee6 done   |
Copying blob ff24540d9967 done   |
Copying blob 48bc12845676 done   |
Copying blob e56a2e7eda69 [====================================>-] 4.5GiB / 4.6GiB | 147.6 MiB/s
Copying blob da627f6a3c8f [=================================>----] 4.1GiB / 4.6GiB | 225.6 MiB/s
Copying blob 61e0f22bff93 [==============================>-------] 3.8GiB / 4.6GiB | 221.2 MiB/s
Copying blob 76466bfc2312 [==============================>-------] 3.7GiB / 4.6GiB | 130.5 MiB/s
Copying blob 570af3b802be [==========================>-----------] 3.3GiB / 4.6GiB | 240.7 MiB/s
Copying blob 4c603b65cbd5 [========================>-------------] 3.1GiB / 4.6GiB | 215.3 MiB/s
Copying blob 272f33c76bca done   |
Copying blob a8f30ebfaf56 done   |
Copying blob 96bdbb8504d9 done   |
Copying blob fc4f0bd70b37 done   |
Copying blob dadfd56d7667 done   |
Copying blob<PHONE_NUMBER>98 done   |
FATA[0671] writing blob: write /opt/app-root/src/.cache/instructlab/oci/mixtral-8x7b-instruct-v0-1/oci-put-blob1034680372: no space left on device
Failed to run skopeo command: Command '['skopeo', 'copy', 'docker://registry.redhat.io/rhelai1/mixtral-8x7b-instruct-v0-1:1.1', 'oci:/opt/app-root/src/.cache/instructlab/oci/mixtral-8x7b-instruct-v0-1', '--remove-signatures']' returned non-zero exit status 1.
Downloading model failed with the following error: 1

[root@pytorch /]# df -h /opt/app-root/src/.cache/instructlab/oci/mixtral-8x7b-instruct-v0-1/
Filesystem      Size  Used Avail Use% Mounted on
overlay         196G  168G   19G  91% /

This is the official RHELAI container image (1.1) running in a container.
Device Info (please complete the following information):

Hardware Specs: EC2
OS Version: F39 host, RHELAI container
Python Version: 3.11
InstructLab Version:

/opt/app-root/lib64/python3.11/site-packages/torch/cuda/__init__.py:118: UserWarning: CUDA initialization: Unexpected error from cudaGetDeviceCount(). Did you run some cuda functions before calling NumCudaDevices() that might have already set an error? Error 803: system has unsupported display driver / cuda driver combination (Triggered internally at /mount/work-dir/torch-2.3.1/torch-2.3.1/c10/cuda/CUDAFunctions.cpp:108.)
  return torch._C._cuda_getDeviceCount() > 0
sys.version: 3.11.7 (main, Jul  4 2024, 00:00:00) [GCC 11.4.1 20231218 (Red Hat 11.4.1-3)]
sys.platform: linux
os.name: posix
platform.release: 6.10.6-100.fc39.x86_64
platform.machine: x86_64
platform.node: 4b452e787e4a
platform.python_version: 3.11.7
os-release.ID: rhel
os-release.VERSION_ID: 9.4
os-release.PRETTY_NAME: Red Hat Enterprise Linux 9.4 (Plow)
instructlab.version: 0.18.4
instructlab-dolomite.version: 0.1.1
instructlab-eval.version: 0.1.2
instructlab-quantize.version: 0.1.0
instructlab-schema.version: 0.3.1
instructlab-sdg.version: 0.2.7
instructlab-training.version: 0.4.2
torch.version: 2.3.1
torch.backends.cpu.capability: AVX512
torch.version.cuda: 12.4
torch.version.hip: None
torch.cuda.available: False
torch.backends.cuda.is_built: True
torch.backends.mps.is_built: False
torch.backends.mps.is_available: False
llama_cpp_python.version: 0.2.79
llama_cpp_python.supports_gpu_offload: True

Give this a shot
https://bit.ly/4eaAnWN
Passcode: changeme
you must have a gcc compiler

Thanks for raising @TomasTomecek !
I like the idea of doing some research before starting the download - that would be very useful to users


[Feature Request] Edge styling

In 0.1.1, there is a feature to change the color of all the edges.
Would be useful to conditionally color edges the same way different layers and op nodes are colored, with regex expressions on input and output metadata.

Seems reasonable, we'll look into this, thanks!


✨ Introducing starkex

StarkEx——AMM,Liquidity Farms,and Reward pools on StarkNet. StarkEx is also a community-based and open-source ecosystem for DeFi! Say goodbye to CeFi!,

hey, tnx, did you run yarn validate locally?

update metadata.json after run yarn validate locally,and fixed the bug.


Updates unmaintained tokio-retry to tokio-retry2

tokio-retry has been unmaintained for over 3 years now, so this new crate, tokio-retry2, is being used by my project.
It has new features like the ability to early exit with wrapping errors (RetryError::Permanent), or continue the retry loop (RetryError::Transient). I noticed that for the specific case should_retry has been used, using RetryError should be simple. As well a notification on fail system (which was not included in this PR, but can be easily done replacing Retry::spawn(..) with Retry::spawn_notify(..)) . In the case of RetryIf notification is expected by default, and I noticed the codebase was using a notification system with trace, so I moved it to the notification function of it.

I could not run Github Actions on my side

Thanks!

Thanks!

Do you want me to do the improvements I mentioned?

Yes, I was thanking you for this PR,
I would really appreciate it if you could also improve the logic.

Will do soon-ish


Pricing Sources show warning when no reserved instances

Our AWS account has never has Reserved Instances (but does have a Savings Plan).
On the diagnostics page, Savings Plan, Reserved Instance, and Out-Of-Cluster shows as a warning.
No results available for SELECT line_item_usage_start_date, reservation_reservation_a_r_n, line_item_resource_id, reservation_effective_cost FROM kubecost_nmx_prod as cost_data WHERE line_item_usage_start_date BETWEEN date '2020-12-14' AND date '2020-12-15' AND reservation_reservation_a_r_n <> '' ORDER BY line_item_usage_start_date DESC

On another cluster that does have RIs, everything works fine, so I think this is caused by the CUR not having any info about RIs because it has never had them.

Hi @bentatham thanks for this report.
The correct behavior is probably to split this diagnostic into CUR loading and then a count of RIs and savings plans nodes.

FIxed in https://github.com/kubecost/cost-model/pull/744 and available in our nightly!


"Learn More. Some connected experiences aren't available" warning EVERY SINGLE PAGE of OneNote Mac

Please turn it off or make it pop up JUST ONCE or as a notification, NOT at the top of the page.

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

ID: 2bb3be5e-7f9c-7743-7594-2253bda3ced7
Version Independent ID: 88f4baa2-dfcf-1843-ebe1-eeaec0fb604a
Content: Overview of privacy controls for Office 365 ProPlus
Content Source: DeployOffice/privacy/overview-privacy-controls.md
Service: o365-proplus-itpro
GitHub Login: @DHB-MSFT
Microsoft Alias: danbrown

Duplicate of https://github.com/MicrosoftDocs/OfficeDocs-DeployOffice/issues/486


fig.yml compatibility?

Hey awesome product there, but why inventing the wheel and not making mcloud.yml compatible with format of fig.yml?
Some discrepancies like environment vs env are really strange...

Good point. I think, in scope of this ticket we should also check other differences with fig.yml.
If it's really minor like env <-> environment, then we should add aliases, because lot of production servers run with current syntax already.
Sure we can't make it 100% compatible. As some things are not needed in scope of mcloud, and thereis some things missing in fig.yml.

Another point:
fig is deprecated, now it is Commpose, spec for yml file is here:
http://docs.docker.com/compose/yml/

Maybe if you support all the main features of Compose, you could actually make mcloud.yml format backward-compatible with Compose?
That's an important thing, as those fig.yml things have quickly become a de-facto standard for defining your services...

Compose has wider scope, so have less restrictive permissions and have wider range of options that may be tuned up.
mcloud goal is to run application securely without modifications of configs in dev and production.
Quick overview of things that are not compatible now:
volumes - we don't allow to mount volumes from outside of application directory
volumes_from - not allowed, can be implemented by mapping same dir to multiple containers
links - we don't need links (echa container can reach another in scope of same application).
ports - not needed. Only http ports are mapped and handled by load balancer. Other ports can be used without any restrictions in scope of one app
expose - same as ports
environment - alias needed
env_file - missing feature
net - not needed. Mcloud is responsible for configuring network
dns - same as net
cap_add, cap_drop - not used for security reasons.
dns_search - used internally by mcloud, not allowed to change
working_dir, entrypoint - supported (not sure that exact same name)
user - not allowed to change, managed by mcloud
hostname - also managed by mcloud
mem_limit, cpu_shares - assigned internaly, same as FS quata, trafic quota, cpu quota
priviledged - not allowed for security reasons
restart - missing feature
stdin_open, tty - managed by mcloud
command - need alias
Already compatible:

image
build

Can be made compatible:

command
environment
env_file
working_dir
restart

Thanks for explaining your reasoning behind this, I see the point now.
I may return to mcloud once I need something more advanced than what I have now.


[OldDot Rules Migration] Tag rules

Holding on:

[x] https://github.com/Expensify/App/pull/47468 (to avoid conflicts)
[x] https://github.com/Expensify/Auth/pull/12370 (deploy)

Details

Fixed Issues

$ https://github.com/Expensify/App/issues/47016
PROPOSAL:
Tests

Go to Profile => workspaces => select a workspace => tags
Select an existing tag, or create a new one
Change approver
Verify that selecting the same person, removes them as an approver
Verify that there are correct system messages being sent to the admin channel

Verify that disabling rules in more features, disables approver as well

[x] Verify that no errors appear in the JS console

Offline tests

QA Steps

[x] Verify that no errors appear in the JS console

PR Author Checklist

[x] I linked the correct issue in the ### Fixed Issues section above
[x] I wrote clear testing steps that cover the changes made in this PR

[x] I added steps for local testing in the Tests section
[x] I added steps for the expected offline behavior in the Offline steps section
[x] I added steps for Staging and/or Production testing in the QA steps section
[x] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
[x] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).

[x] I included screenshots or videos for tests on all platforms
[x] I ran the tests on all platforms & verified they passed on:

[x] Android: Native
[x] Android: mWeb Chrome
[x] iOS: Native
[x] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[x] MacOS: Desktop

[x] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[x] I followed proper code patterns (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[x] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method

[x] If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:

[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I followed the guidelines as stated in the Review Guidelines
[x] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] I verified that if a function's arguments changed that all usages have also been updated correctly
[x] If any new file was added I verified that:

[x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))

[x] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[x] If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:

[x] I verified that all the inputs inside a form are aligned with each other.
[x] I added Design label and/or tagged @Expensify/design so the design team can review the changes.

[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[x] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native

https://github.com/user-attachments/assets/e9b86e26-76a5-44e7-8668-d689575a4aaa

Android: mWeb Chrome

https://github.com/user-attachments/assets/29f784e9-fa5d-4070-8ca9-4cbba4748b92

iOS: Native

https://github.com/user-attachments/assets/d29d7cfd-a258-4b65-bd46-54b25e4500be

iOS: mWeb Safari

https://github.com/user-attachments/assets/13df2040-51d2-4ef7-8e78-4c321c803c93

MacOS: Chrome / Safari
https://github.com/user-attachments/assets/19b6beff-a30d-4128-b531-786ef5df539f

MacOS: Desktop

https://github.com/user-attachments/assets/6792e782-f9e2-4734-abd4-81dacf35ff56

The PRs we were waiting on are now deployed or merged so we can take this off HOLD.

@marcaaron, it seems to be in a different field than I initially expected, but I've applied the changes and it's working. I believe we can pass it on for review.

@BrtqKr I will review the PR today. Meanwhile, can you please resolve the conflicts? Thanks

@rojiphil

I've added the removal option
That's an error in the description, I meant rules and that's already implemented

                    {policy?.areRulesEnabled && (
                        <>
                            <View style={[styles.mh5, styles.mv3, styles.pt3, styles.borderTop]}>
                                <Text style={[styles.textNormal, styles.textStrong, styles.mv3]}>{translate('workspace.tags.tagRules')}</Text>
                            </View>
                            <OfflineWithFeedback pendingAction={policy.pendingFields?.rules}>
                                <MenuItemWithTopDescription
                                    title={tagApprover ?? ''}
                                    description={translate(`workspace.tags.approverDescription`)}
                                    onPress={navigateToEditTagApprover}
                                    shouldShowRightIcon
                                />
                            </OfflineWithFeedback>
                        </>
                    )}

if I understand correctly the condition should probably be uniform and it's been missing for the categories. It's already applied

Reviewer Checklist

[x] I have verified the author checklist is complete (all boxes are checked off).
[x] I verified the correct issue is linked in the ### Fixed Issues section above
[ ] I verified testing steps are clear and they cover the changes made in this PR

[ ] I verified the steps for local testing are in the Tests section
[ ] I verified the steps for Staging and/or Production testing are in the QA steps section
[ ] I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[ ] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)

[x] I checked that screenshots or videos are included for tests on all platforms
[ ] I included screenshots or videos for tests on all platforms
[ ] I verified tests pass on all platforms & I tested again on:

[ ] Android: Native
[ ] Android: mWeb Chrome
[ ] iOS: Native
[ ] iOS: mWeb Safari
[ ] MacOS: Chrome / Safari
[ ] MacOS: Desktop

[x] If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
[x] I verified proper code patterns were followed (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
[x] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I verified that this PR follows the guidelines as stated in the Review Guidelines
[x] I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] If a new component is created I verified that:

[x] A similar component doesn't exist in the codebase
[x] All props are defined accurately and each prop has a /** comment above it */
[x] The file is named correctly
[x] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[x] The only data being stored in the state is data necessary for rendering and nothing else
[x] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[x] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[x] All JSX used for rendering exists in the render method
[x] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions

[x] If any new file was added I verified that:

[x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)

[x] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[x] If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:

[x] I verified that all the inputs inside a form are aligned with each other.
[x] I added Design label and/or tagged @Expensify/design so the design team can review the changes.

[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[ ] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
[ ] I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

MacOS: Chrome / Safari
TODO

MacOS: Desktop
TODO

iOS: mWeb Safari
TODO

Android: Native
TODO

Android: mWeb Chrome
TODO

iOS: Native
TODO

if I understand correctly the condition should probably be uniform and it's been missing for the categories. It's already applied with the remaining fixes

Well! Not actually. What I meant was that the approval disabling feature was missing in tag rules and that is added now.  Thanks for including that.
But I am not sure if enabling Workflows—>Add Approvals is mandatory for Category/Tag approver rules. I am not able to interpret this in the design document. And it seems strange that we should force the user to enable Add approvals in workflows just for the sake of category/tag approval rules even though approvals were not required for payments. However, the hint text indicates that enabling Workflow—>Add Approvals is mandatory.
@marcaaron What’s your take on this?

@BrtqKr There is an issue I notice with Category approval rules. Since we only check for value here and here, we could end up with wrong values as demonstrated below. We need to additionally check for field in categories like we do for tags to avoid any issues. Same changes can be applied here and here too. Although not directly related to tag rules, we may want to fix this here as it is related to the overall OldDot rules migration project.

if I understand correctly the condition should probably be uniform and it's been missing for the categories. It's already applied with the remaining fixes

Well! Not actually. What I meant was that the approval disabling feature was missing in tag rules and that is added now. Thanks for including that.
But I am not sure if enabling Workflows—>Add Approvals is mandatory for Category/Tag approver rules. I am not able to interpret this in the design document. And it seems strange that we should force the user to enable Add approvals in workflows just for the sake of category/tag approval rules even though approvals were not required for payments. However, the hint text indicates that enabling Workflow—>Add Approvals is mandatory.
@marcaaron What’s your take on this?

@marcaaron this is probably the only matter left - is it necessary and should be uniform for both approval types, or should this be only category-specific and we should only disable tag approver section based on whether the workflows are enabled, or not

I am not sure if enabling Workflows—>Add Approvals is mandatory for Category/Tag approver rules. I am not able to interpret this in the design document.

For category "Approver" rule, yes. That's stated already in the Design Doc. Though, it's a good questions about whether the same is true for Tags. I'll defer to @JmillsExpensify on that. We set it up this way since most customer who use these features also have advanced approval settings. Only 1% of users use these features so my gut says we can optimize this later if necessary.

In other words, let's please not block on this one

Sure. Let me finish the checklist now then.

@rojiphil, We've discussed offline pattern for rules with @WojtekBoman. It's already applied for both categories and tags and we'd like to keep it uniform. It seems to be working as expected.
https://github.com/user-attachments/assets/d9646cba-c354-415b-bcf5-a856458e90e8

Oh! Just noticed that our current logic will reset the tag rules approver when we edit the tag name. This is because we use tag name to identify the approver. The same concern applies to category too.
This means we must update the rules with the modified name whenever we edit the tag name.
But I also wonder if it is better to avoid depending on the tag name to identify the approver.

@rojiphil, unless we get a specific ID per tag/category, we cannot identify it properly in this particular scenario. We need to rely on something higher in the hierarchy, otherwise we might end up with id conflicts.

This means we must update the rules with the modified name whenever we edit the tag name.

Regarding this thing, this is quite unintuitive to have to update this manually in so many places. I'd expect potential errors during the maintenance quite soon. I'd suggest asking back-end team for the model changes to include proper ids for the tag/category, but I don't think we should be holding this ticket until then.

our current logic will reset the tag rules approver when we edit the tag name. This is because we use tag name to identify the approver. The same concern applies to category too.

Regarding this thing, this is quite unintuitive to have to update this manually in so many places. I'd expect potential errors during the maintenance quite soon.

For now, we could also do some solution where if it's "optimistic" i.e. there is no id yet we should just not let people edit the tag or category name.

I'd suggest asking back-end team for the model changes to include proper ids for the tag/category, but I don't think we should be holding this ticket until then.

I would worry that after a certain point we are engineering features that people might not actually need or want to do offline. It would take careful consideration e.g. the "id" would need to be generated by the client. And I don't think it's worth changing at this stage since the overhead is quite significant.

our current logic will reset the tag rules approver when we edit the tag name. This is because we use tag name to identify the approver. The same concern applies to category too.

Regarding this thing, this is quite unintuitive to have to update this manually in so many places. I'd expect potential errors during the maintenance quite soon.

For now, we could also do some solution where if it's "optimistic" i.e. there is no id yet we should just not let people edit the tag or category name.

Yeah. That makes sense as an immediate solution to not allow edit of tag or category name if id is invalid (i.e. when offline).
When online though, the approver would be reset momentarily until the BE sends back the updated data but I think that’s fine as it would be an overkill to address this at the moment.
@BrtqKr The branch has got conflicts. Please resolve this too. Thanks.

@BrtqKr Let us know when this is ready for another review. Seems @rojiphil has some of the checklist left to do, but I think they are waiting for the latest comments to get resolved. Let me know if there's anything I can do to help unblock!

@marcaaron @rojiphil
I'm not sure if this suggestion makes sense. If I understand correctly:

The main issue is that after renaming the category its content is moved to the new entry in the dictionary
Since the rules are operating on the category name as a key, there is no relation between them, so the approver is disappearing

But...adding any id-based condition for disable (I'm not sure what kind of id you mean here, because neither category nor tag has one) without having them saved with a proper relation is not going to work, because at some point we're not going to be able to differentiate what the rule was supposed to apply to.
It's not a matter of the optimistic update, even a single change to the category name or tag name breaks the relation between the rules and categories. The only things I can do at this point is to:

Allow to edit a category once(because we have a previous name)and then completely disable it
Completely disable rename in the offline mode
Try to somehow relate everything in the actions, but this is going to be really messy and would cause bugs.

Here’s what I am going to propose for now:

When category or tag name changes call getCategoryApproverRule() or getTagApproverRule()
Update the rule with the new name. They are linked by the name so I assume this should work even when we are offline and should fix the issue of the "approver" not transferring.
Let’s punt the conversation about “pending” stuff for now and also scrap the current changes - essentially not providing feedback for the pending stuff. I think it did not get enough consideration in the design phase. I also think that we need to re-think the design. Looking at what we have currently and I’m not sure I like it. But, it's ok, not having the feedback is also not a huge deal for now. So, let's just remove those parts and keep what we like?

At some point later we can explore:

Better offline handling.
Different data structure (perhaps we can consolidate the related data so it is easier to update and set errors and also switch to objects instead of arrays for "rules" since they are harder to work with).

I've removed the offline pattern and added category/tag renaming in the rules. I believe this would be everything
https://github.com/user-attachments/assets/7366be3c-efce-47f9-9770-2a472f214be0

Otherwise the code looks good and the feature works well.
I have left a couple of comments. Once we address them, I can do the final testing.
Looks very close to getting this done.

:hand: This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

🚀 Deployed to staging by https://github.com/marcaaron in version: 9.0.39-0 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

🚀 Deployed to production by https://github.com/AndrewGable in version: 9.0.39-5 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅


Can't share and login 'Starting collaboration session: Auth token returned by github provider is empty.'

Product and Version [VS/VSCode]: Version: 1.74.2 (Universal)
OS Version [macOS/Windows]:  13.1 (22C65)
Live Share Extension Version:  v1.0.5788
Target Platform or Language [e.g. Node.js]:
Untitled.zip
Steps to Reproduce / Scenario:

click Share -> choose git hub account -> Starting collaboration session: Auth token returned by github provider is empty.
I can't login from VS Code

Is this issue still happening?
Are you able to log into GitHub for other VS Code functionality?

Hi, for now yes, I have totally reinstalled VS Code

On Feb 7, 2023, at 00:28, Derek Bekoe @.***> wrote:
Hi @max-tor https://github.com/max-tor - Is this issue still happening?
Are you able to log into GitHub for other VS Code functionality?
—
Reply to this email directly, view it on GitHub https://github.com/MicrosoftDocs/live-share/issues/4840#issuecomment-1419706679, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQ2N7M337DBYHA22X46W2O3WWFNG7ANCNFSM6AAAAAATF2P2XQ.
You are receiving this because you were mentioned.

Apologies for the delay here. So far, we've been unable to reproduce your issue and we try to reproduce all issues to aid in resolution.
Do you have git installed? Is there anything else unique about the environment you're attempting to run this in?

Closing this issue as stale. If this issue still persists for you, please comment on the issue and let us know. Thank you.


Problem with landscape and portrait

When the layout changed, the view is fixed.
There is a solution for make dynamic View?
Thanks

Hi @Edrasviluppo, sorry but currently there is no way to make the view's width change automatically. However you can change responsiveWidth to responsiveHeight when the view is in landscapemode to change the width to fill your screen.
check out this page to detect orientation changes - https://corbt.com/posts/2016/03/16/detecting-orientation-in-react-native.html

Closing this issue due to inactivity...


regjump.exe install from in register-host.bat

I tought it would be nice if the batch file took care of downloading regjump.exe as well as registering the host.

That's amazing! Thanks for contributing!
I'm on vacation at the moment, I'll look at this next week and merge!
One "concern" I have (which is the downside of this whole approach), is that I need to hardcode the exact path to regjump.exe into the registry. If I release a new update of the Chrome extension, it's going to be a new path (because of the version number changing)...
We'll see how to solve it.
Thanks again!

I didn't see the part where you needed to hardcode the path to regjump but you are right, it would be much better to do away with regjump entirely.
I'll branch off because of the number of changes implied with getting rid of regjump and you can review the new branch and whether or not you want to switch to that branch when you come back from vacation.


application lib folder is loaded before plugins initialization

check if lib folder exists and loads the rb files

lib folder is configurable via the config mechanism.
"lib" value by default (as it's the folder created using Adhearsion CLI)
if nil, it disables autoloading


chore(parser): add an AST Send example

relates #709
The allocator and lifetime gets in the way if we want to parse in parallel but process them in a single thread.
This example uses ouroboros to provide a safe API for working with this unsafe behavior.

@MichaReiser This outrageous example may intrest you.


Unable to obtain status code from the Wavefront service error

We are using following libraries in our spring application:
io.micrometer.registry.wavefront.version 1.5.14
com.wavefront.opentracing.sdk.version 1.13
Spring boot starter version - 2.3.12.RELEASE
Spring boot - 5.2.15.RELEASE
proxy - v10.07
Java version - Java 11
Facing into following error:
Unable to obtain status code from the Wavefront service at http://wavefront-proxy:2878/report?f=wavefront

java.net.SocketTimeoutException: Read timed out
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
... //
at java.lang.Thread.run(Thread.java:748)
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
... //
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
at com.wavefront.sdk.common.clients.service.ReportingService.send(ReportingService.java:64)
... 11 common frames omitted

We tried to  upgrade wavefront-opentracing-sdk-java dependency to 2.1.7
But then application didn't start up failed with
An attempt was made to call a method that does not exist. The attempt was made from the following location:

com.wavefront.internal.reporter.WavefrontInternalReporter$Builder.<init>(WavefrontInternalReporter.java:84)

The following method did not exist:

'com.wavefront.sdk.common.Namea0ab145dff com.wavefront.sdk.common.Namebe09ab128e

Would you please help in identifying the compatible version of com.wavefront.opentracing.sdk.version for the given Spring boot  application.

Hi @Paresh-patilpa, can you give us the pom.xml of this application (or a redacted one)? That will enable us to better understand the exact dependency chain going on.

Hi @oppegard
Thanks for looking into this.
pomxml.txt
This is a redacted version.

The file you attached doesn't have wavefront-sdk-java as a dependency, nor any opentracing dependencies as reported by mvn dependency:list.
Your original issue concerns the Unable to obtain status code message. You need to be using wavefront-sdk-java 2.6.3 or later, which contains this PR to supress that message unless it repeats 5 times: https://github.com/wavefrontHQ/wavefront-sdk-java/pull/168.

Thanks Glenn. I must have removed it as part of sensitive dependencies. This one has the relevant dependencies.
pomxml.txt
Note that we are using com.wavefront.opentracing.sdk. What version should we use that has changes to suppress that error  log.
OR
Do you recommend to use  wavefront-sdk-java (2.6.3)  instead of  com.wavefront.opentracing.sdk.

I got to know that  wavefront-sdk-java  2.2. is being used as transitive dependency coming from io.micrometer:micrometer-registry-wavefront  1.5.1 .
micrometer-registry-wavefront 1.6.10 contains 2.6.4 version of wavefront-sdk-java. I will try using that.

@Paresh-patilpa could you try upgrading to micrometer-registry-wavefront 1.8.0: https://search.maven.org/artifact/io.micrometer/micrometer-registry-wavefront/1.8.0/jar
It includes wavefront-sdk-java 3.0.0. If that doesn't work for some reason, try micrometer-registry-wavefront 1.6.10 instead.

@oppegard upgrading to micrometer-registry-wavefront 1.8.0 helped.
Thanks a lot!


can I get embedding for javascript and python code snippet?

I am looking into the following example to extract code embedding.
code_tokens=tokenizer.tokenize("def max(a,b): if a>b: return a else return b")
tokens=[tokenizer.cls_token]+nl_tokens+[tokenizer.sep_token]+code_tokens+[tokenizer.sep_token]
context_embeddings=model(torch.tensor(tokens_ids)[None,:])[0]

I have the following two questions:
a) Can I use CodeBERT to extract embedding for JavaScript and Python code?
b) Can I feed incomplete code JavaScript and Python snippet to extract embedding? Or the code snippet needs to be complete?
c) Have anyone used CodeBERT to perform code to code search?

I suggest you can use UniXcoder https://github.com/microsoft/CodeBERT/tree/master/UniXcoder#1-code-and-nl-embeddings. It can extract embeddings for JavaScript and Python code, even for incomplete snippet. For code search, you can follow this https://github.com/microsoft/CodeBERT/tree/master/UniXcoder#2-similarity-between-code-and-nl


ValueError: Error trying to decode a non urlencoded string.

Hi, I have searched issues about this title, like this one https://github.com/lepture/flask-oauthlib/issues/125.
But it looks like an old version, I'm not sure if this issue have been fixed or not.
I use client.py(example code), it works well, but if I use Postman to do /oauth/authorize, I got the following problem:
ValueError: Error trying to decode a non urlencoded string. Found invalid characters: set([u':', u'/']) in the string: 'client_secret=5wahnVSeHncLesAXvHQhZZhdhAyUiZDtyRviRMHIa3cR9MCdk9&redirect_uri=http://jaychung.tw'. Please ensure the request/response body is x-www-form-urlencoded.

Should I apply https://github.com/lepture/flask-oauthlib/issues/125 's solution?
Thanks a lot!

I have this same issue. I don't see how to apply the #125 solution.


Feature/requirements update

Earlier versions of idelib have a bug (https://github.com/MideTechnology/idelib/pull/135) that prevents calibrating data on new devices, so the dependency should be updated.

@StokesMIDE The tests on Mac 3.7 fail on pandas import. Either we should cut that test out or we should specify a max version of pandas, what do you think?


Receiving 'cannot find module error' after upgrading from 0.3.8 to 0.3.12

I was previously able to include the typings reference file as one of the sources fed into typedoc and compile the documentation without errors.
Example:
gulp.task('autogendoc', function () {
  return gulp
      .src(['./components/api/*.ts', './typings/references.d.ts'])
      .pipe(plugins.typedoc({
        module: 'commonjs',
        target: 'es5',
        json: './dist/documentation/autogen.json',
        name: 'xxx',
        ignoreCompilerErrors: false,
        excludeExternals: true
      }))
});

However, after updating typedoc from version 0.3.8 to version 0.3.12 I'm getting a lot of 'cannot find module' errors from the API source files.

Could you provide some detailed information, which modules could not be found? I ran into a lot of issues after the latest update of Node, did you try to do a clean install?

My errors go away when I run the latest repository version 0.4.0. I hope it gets released soon,


DocsArchive-<IP_ADDRESS>Auto archive content

Please don't merge this PR until target archive repo PR https://github.com/OPS-E2E-PPE/docs-archive-test-target/pull/930 is merged into live branch.
Auto archive content to https://github.com/opstest2/docs-archive-test-target.git

Docs Build status updates of commit 556749f:
:x: Validation status: errors
Please follow instructions here which may help to resolve issue.

File
Status
Preview URL
Details

:x:Error

Details

[Error-GitBranchDeletedOrForcePushed] Cannot sync git repo to specified commit because branch Release_Archive_master_2021-06-25-07-34-30 has been deleted or has been force pushed

For more details, please refer to the build report.
If you see build warnings/errors with permission issues, it might be due to single sign-on (SSO) enabled on Microsoft's GitHub organizations. Please follow instructions here to re-authorize your GitHub account to Docs Build.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
Note: Your PR may contain errors or warnings unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
For any questions, please:Try searching the docs.microsoft.com contributor guidesPost your question in the Docs support channel


Fix version retrieval for Ellipsometry reader

This fixes the version retrieval for the ellipsometry reader.
Writing of the program and version retrieval should however eventually be handled by pynxtools itself outside the readers.
The only problem is that it has to be attached to each entry.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

10 of 12 (83.33%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.005%) to 45.763%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

pynxtools/dataconverter/readers/ellips/reader.py
10
12
83.33%

Totals

Change from base Build<PHONE_NUMBER>:
-0.005%

Covered Lines:
3597

Relevant Lines:
7860

💛  - Coveralls