WIP Docker support

Adds Dockerfile to run on a linx host or VM in on a mac.

TODO

[ ] Add back 2 factor auth somehow
[ ] Add support for specifying the credentials profile boto uses

@dump247 re: your comment about removing the MFA token prompt -- is there some way for this to work on an MFA account without prompting for MFA?
Would be curious to try this docker solution but my personal creds are MFA.

You can put the seed of the TOTP in the config, then it can generate the codes for you (This isn't coded yet and would need adding). That partially defeats the point as then the code and the auth tokens are all on the same machines. But might work for you.

Also I thought I should add we've been using this PR for the last 6 months without problems for many developers.
Any thoughts on how we should progress?

@matschaffer @danharvey Generating TOTP codes has already been implemented in master. There is a config option to provide the secret.

MFA is not required to use this service. This service checks if MFA is enabled on the account and then attempts to use the MFA token to generate credentials. If MFA was enabled in configuration, instead of occurring by default, it should resolve the issue with merging this PR.
@matschaffer If you need something to provide credentials to docker containers in EC2, I would recommend using Docker EC2 Metadata. With that service, you use the instance profile and roles instead of access/secret key. This means you don't need to distribute those secrets and your credentials get automatically rotated.

@dump247 I'm a little curious about why MFA is needed for this when my usual key/secret work without MFA on the same account. But granted, I haven't dug into the details of this service at all yet.
https://github.com/dump247/docker-ec2-metadata looks handy if you want to override the profile for a given container but that's not my case at the moment. Things in EC2 work fine thanks to the metadata endpoint being accessible from docker.
What I'm trying to handle is locally running docker containers (e.g., boot2docker) having access to AWS services via my personal keys at dev time.

Just because MFA is enabled on an account doesn't mean that the policy that allows your account access to the resources enforces MFA on all API calls, you can pick and choose.
@matschaffer that's how we're using this with Docker locally on our Mac's, I can publish the systemd unit / routes we've added to CoreOS for this to work. I think it was open but we may have closed the github repo.

The issues with MFA we also hit, we have MFA for the console but not API calls. So having that configurable would help. Would fix the issue in this PR so I'll take a look at that unless you were @dump247?

I just got back from vacation with no internet access (woohoo!).
@matschaffer Sorry if I wasn't clear, but MFA is not required for the service to operate. It is just enabled by default if you have MFA enabled on your account. The initial use case was to enable seamless MFA-enabled API access, so that is why it is the default. Currently, there is no way to disable this operation, but it should be pretty easy to add.
@danharvey I will implement that today or tomorrow. It will require some documentation updates.
Is it reasonable for the default to remain as it is, and assume you want MFA API access, or should be default be to only enable MFA if you specifically enable it?

I guess an ideal might be to have it default to no MFA prompts but with a clear error upon hitting an MFA protected API. No idea if that's feasible though, so just a basic way to toggle MFA prompting off would be handy.

I don't have a preference either way for it being default or not. I don't see any advantage or disadvantage to either. I guess as long as it's documented clearly about why some API calls will fail if you've setup a MFA policy then that's fine. But I'd hope people know what they've setup!

I'll also dig out the linux iptables rules I use on CoreOS in a VM to get this to work, and document how to use the docker file.
Any preference to docs in the git repo or wiki? I think the former would be easier then we can review it.

@matschaffer This service only provides credentials, so there is no way to know how the credentials will be used. Also, I don't believe there is a clear method for determining if the API is MFA protected since that is embedded in IAM rule conditions.
@danharvey Put the documentation in the git repo in a /docs/ directory.

Ahh... Fair point. Configurability with default to MFA enabled for MFA
accounts sounds like the right move then.
On Tuesday, June 23, 2015, Cory Thomas<EMAIL_ADDRESS>wrote:

@matschaffer https://github.com/matschaffer This service only provides
credentials, so there is no way to know how the credentials will be used.
Also, I don't believe there is a clear method for determining if the API is
MFA protected since that is embedded in IAM rule conditions.
@danharvey https://github.com/danharvey Put the documentation in the
git repo in a /docs/ directory.
—
Reply to this email directly or view it on GitHub
https://github.com/dump247/aws-mock-metadata/pull/3#issuecomment-114506679
.

--
-Mat
about.me/matschaffer

I just pushed a change to master so you can disable MFA in the config file.
Commit 4047552d25006d27dc7ce59a78c13afc6e5d8fe4


desktop app 0.30 not start

take this window with desktop app 0.30 and stuck on him (work on web)
http://prntscr.com/wbjcaj

Thank you for reporting this bug!
It should be fixed in version 0.0.31.


AttributeError: 'MyView' object has no attribute 'children'

Summary
When I try to pass message or user to the button, I get this error.
Reproduction Steps
This is the snippet that I am trying to run.
class MyView(nextcord.ui.View):
    def __init__(self, message, user):
        self.message = message
        self.user = user
    @nextcord.ui.button(label='A button', style=nextcord.ButtonStyle.primary)
    async def button_callback(self, button, interaction):
        button.disabled = True
        self.user.ban()
        interaction.response.send_message('Succesfully banned.', ephemeral=True)

@client.command()
async def buttons(message, user: nextcord.Member=None):
    await message.send(f"What would you like to do with {user}?",view=MyView(message, user))

Minimal Reproducible Code
This is the snippet that I am trying to run.

class MyView(nextcord.ui.View):
    def __init__(self, message, user):
        self.message = message
        self.user = user
    @nextcord.ui.button(label='A button', style=nextcord.ButtonStyle.primary)
    async def button_callback(self, button, interaction):
        button.disabled = True
        self.user.ban()
        interaction.response.send_message('Succesfully banned.', ephemeral=True)

@client.command()
async def buttons(message, user: nextcord.Member=None):
    await message.send(f"What would you like to do with {user}?",view=MyView(message, user))

Expected Results
When I do the command, it should have sent a message with a button called A button, and when I click the button, it should ban the passed user.
Actual Results
It gave me this error:
Ignoring exception in on_command_error
Traceback (most recent call last):
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/nextcord/ext/commands/core.py", line 168, in wrapped
    ret = await coro(*args, **kwargs)
  File "main.py", line 53, in buttons
    await message.send(f"What would you like to do with {user}?",view=MyView(message))
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/nextcord/abc.py", line 1370, in send
    components = view.to_components()
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/nextcord/ui/view.py", line 197, in to_components
    children = sorted(self.children, key=key)
AttributeError: 'MyView' object has no attribute 'children'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/nextcord/client.py", line 351, in _run_event
    await coro(*args, **kwargs)
  File "main.py", line 60, in on_command_error
    raise error
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/nextcord/ext/commands/bot.py", line 995, in invoke
    await ctx.command.invoke(ctx)
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/nextcord/ext/commands/core.py", line 895, in invoke
    await injected(*ctx.args, **ctx.kwargs)
  File "/opt/virtualenvs/python3/lib/python3.8/site-packages/nextcord/ext/commands/core.py", line 177, in wrapped
    raise CommandInvokeError(exc) from exc
nextcord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'MyView' object has no attribute 'children'

Intents
None.
System Information
- Python v3.8.12-final
- nextcord v2.0.0-alpha
    - nextcord pkg_resources: v2.0.0a3
- aiohttp v3.7.4.post0
- system info: Linux 5.11.0-1018-gcp #20~20.04.2-Ubuntu SMP Fri Sep 3 01:01:37 UTC 2021

Checklist

[X] I have shown the entire traceback, if possible.
[X] I have searched the open issues for duplicates.
[X] I have removed my token from display, if visible.

Additional Context
No response

Seems like your issue was fixed

Oop yea sry


[SPARK-49362] Simplify snapshot HelmChart to use apache/spark-kubernetes-operator:main-snapshot by default

What changes were proposed in this pull request?
This PR aims to simplify snapshot HelmChart to use apache/spark-kubernetes-operator:main-snapshot by default.
Why are the changes needed?
To help users use it without overriding via --set.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Manual review.
Was this patch authored or co-authored using generative AI tooling?
No.

Could you review this, @viirya ?

Thank you! Merged to main.


Need better documentation on how Reimage works for VMss

Hi,
Need a better documentation on the reimage works.
In a VMss lets say I have 10 VMs and I want to do reimage of all the VMs. How does it work. does it do on by one with zero downtime or does it do all at once?

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

ID: 0408c294-207a-2b72-7b93-e09121602b75
Version Independent ID: 852cb67b-70c6-b811-3b0a-5d5b84b8a911
Content: az vmss
Content Source: src/command_modules/azure-cli-vm/azure/cli/command_modules/vm/_help.py
Service: virtual-machine-scale-sets
Product: unspecified
GitHub Login: @rloutlaw
Microsoft Alias: routlaw

//CC: @gatneil

It does the reimage on all VMs specified in the command; if none are specified, it does all

Hi @gatneil. I am really trying understand how to build some basic scenarios around VMSS and am having a hard time coming up with some fundamentals, or Google is failing me on finding documentation.

Does it reimage them all at once? Is it possible to roll it, or do I need to orchestrate that by hand by slicing instance ids and calling repeatedly?

What does reimage actually mean? There seems to be an entire "Reimaging Overview" document entirely missing. Things that I need to know about:

pitfalls, general guidance
what happens to data disks
rate of which rollout occurs (is the reimage done on my 300 VMs all at once?)
what happens to the VM ID exposed to the VM
does 'reimage' revert just the OS disk? does it reimage to the VMSS model at the last time of upgrade, or does it "reimage" to the current VMSS model?

What is the exact difference between 'upgrade', 'rolling-update' and 'reimage'? This forum post implies that "upgrade" can go one-by-one, but I thought that was exclusive to "rolling-update" and the 4 supported platform images? https://social.msdn.microsoft.com/Forums/en-US/2e9b155b-a11a-461b-ad8b-73f74814a064/vmss-upgrade-and-reimage?forum=WAVirtualMachinesforWindows (OTOH, I think the answer might have conflated Guy's tool with the API functionality inaccurately?)

A table of the three operations, along with rows like "update hw", "reset root disk", "reset disk attachments" etc, would go a long way to helping people build on top of these VMSS features.

Hey @colemickens! Long time no see. I actually don't work in Azure anymore, but I agree that the information should get out there. For #1 and #2, I threw together a couple blog posts that cover the topics:
Updating a scale set (including details around how POST APIs like reimage operate at the control plane): https://negatblog.wordpress.com/2018/06/05/updating-a-scale-set/
Reimaging VMs in a scale set (mostly focused on the data plane - what does reimage actually do?): https://negatblog.wordpress.com/2018/06/05/reimaging-vms-in-a-scale-set/
As for #3: It depends on exact context, but I suspect "upgrade" refers to "manual upgrade" (a.k.a. "update instances"...sigh, there are too many ways to describe the same thing). When doing PUT/PATCH updates in manual upgrade mode, only the scale set model is modified; existing VMs are not. Doing a "manual upgrade" call then brings up each VM specified in the request up to date with the latest model (note: the "manual upgrade" call itself is a POST API, so it behaves as discussed in the first blog post; in particular, this means that the operation happens on all VMs specified at the same time; the upgrade policy is bypassed).
"rolling-update" likely refers to the "rolling" upgrade mode. In this mode, PUT/PATCH updates are rolled out to VMs in the scale set automatically in batches. In this mode, "manual upgrade" calls are not necessary.
Finally, "reimage" replaces the old, crusty OS disk of a specified set of VMs with new, shiny OS disks. (note: this is also a POST API, so it has the same behavior described above).
Hope this helps! Let me know if you have follow-up questions :)

@gatneil :wave:  This is really great, I can't thank you enough. The PUT/PATCH/POST is a great resource too, especially including knowing how to know the request type from the docs. Thank you very much.
I think I only have one more question that you might know, and if not, I can experiment.

Deploy VMSS with user image foo.vhd.
Update the VMSS mode with user image bar.vhd.
(Do not do any upgrade commands to bring any of the VM to the new model, or anything)
Issue reimage to a VM.

Does the new OS disk come back as foo.vhd or bar.vhd?

@colemickens, glad the blog posts were helpful. Let me know if you have other questions that come up. For this particular question, the new OS disk will come back as bar.vhd :)

@rloutlaw, I don't think the information provided should get to the CLI's help file, rather we need a document which can bring in good information from the following sources:
https://negatblog.wordpress.com/2018/06/05/updating-a-scale-set/
https://negatblog.wordpress.com/2018/06/05/reimaging-vms-in-a-scale-set/

I am closing this, as it is not actionable for CLI team

I'm sorry to comment on this closed ticket, however, @colemickens I happened to stumble across this issue while investigating a similar question I had, and was wondering if you were ever able to arrive at a definitive answer as to whether, in your example, you would end up with foo.vhd or bar.vhd. From my testing, it appears that I am ending up with foo.vhd — in other words, I need to explicitly run update-instances on each instance in order to have it start pulling the updated image defined in the scale set model. A simple call to reimage is not sufficient in my testing.
@gatneil, in your blog post, you mention:

Note that with both types of reimaging, the VM is reimaged to the latest model of the scale set, not the model the VM was previously running with (since, in some cases, the VM might model might have lagged behind the overall scale set model). For instance, if you were to create a scale set in manual upgrade mode with admin username “neil”, then update the scale set model to have admin username “notneil”, then reimage VM 27, when VM 27 comes back up, the admin username will be “notneil”.

This logic does not seem to apply to the referenced image itself. Is this consistent with what you would expect? Does anyone know why there might be a discrepancy?

I also came across this thread from Google on what "Reimaging" does, and the blog article (thanks Neil!) answered my question - reimaging does re-execute the Extension scripts on the VMs.
This should be documented better on Microsoft Docs because I could not find it by searching.

During my testing, if the scale set is configured to use the latest image by setting the image ID without specifying a version, using the reimage instance option from the portal will update the selected instances to the latest image.
Example image id:
/subscriptions/<subscriptionID>/resourceGroups/<resourceGroup>/providers/Microsoft.Compute/galleries/<imageGallery>/images/<imageName>"


Box barcode outwards stacking type？

One side always faces out

As shown in the figure, the small green dot is the two-dimensional code, which ensures that the two-dimensional code of all the boxes generated by the stacking type is on the outside

I believe you can make sure that a facing is pointing outside of the pallet.

If you think this is not a valid answer, please reopen this issue.


Gem time lost doesn't bind

Version of Apotheosis 7.1.0
I upgraded a gem to time lost level with the cutting gem table.
But in can't bind the gem on my item.
Is that a bug or this is not implemented yet ?

Time-Lost is not a feature of base apoth, so you have a broken addon messing with things.


Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index

🐛 Bug Report

Exception Message :
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
StackTrace:
at System.Collections.Generic.List1[T].get_Item (System.Int32 index) [0x00009] in <d4a23bbd2f544c30a48c44dd622ce09f>:0    at System.Collections.ObjectModel.Collection1[T].get_Item (System.Int32 index) [0x00000] in :0
at MediaManager.Queue.MediaQueue.get_Current () [0x00000] in C:\Users\mhvdi\Documents\OpenSource\XamarinMediaManager\MediaManager\Queue\MediaQueue.cs:81
at MediaManager.Queue.MediaQueue.OnQueueChanged (System.Object s, MediaManager.Queue.QueueChangedEventArgs e) [0x00000] in C:\Users\mhvdi\Documents\OpenSource\XamarinMediaManager\MediaManager\Queue\MediaQueue.cs:145
at MediaManager.Queue.MediaQueue.OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedEventArgs e) [0x00007] in C:\Users\mhvdi\Documents\OpenSource\XamarinMediaManager\MediaManager\Queue\MediaQueue.cs:138
at System.Collections.ObjectModel.ObservableCollection1[T].OnCollectionChanged (System.Collections.Specialized.NotifyCollectionChangedAction action, System.Object item, System.Int32 index) [0x00009] in <fb6d78e506844b3b96d5b35aa047fbbd>:0    at System.Collections.ObjectModel.ObservableCollection1[T].InsertItem (System.Int32 index, T item) [0x0001a] in :0
at System.Collections.ObjectModel.Collection1[T].Add (T item) [0x00020] in <d4a23bbd2f544c30a48c44dd622ce09f>:0    at MediaManager.MediaManagerBase.AddMediaItemsToQueue (System.Collections.Generic.IEnumerable1[T] items, System.Boolean clearQueue) [0x0001e] in C:\Users\mhvdi\Documents\OpenSource\XamarinMediaManager\MediaManager\MediaManagerBase.cs:89
at MediaManager.MediaManagerImplementation+d__48.MoveNext () [0x00011] in C:\Users\mhvdi\Documents\OpenSource\XamarinMediaManager\MediaManager\Platforms\Android\MediaManagerImplementation.cs:186
--- End of stack trace from previous location where exception was thrown ---
at X.ViewModels.PlayerViewModel+d__59.MoveNext () [0x001cc] in D:\XProject\Mobile\X\X\ViewModels\PlayerViewModel.cs:312
Expected behavior
Player should work, but it is throwing above exception
Reproduction steps

Pass a list of Media Items to player page and call await CrossMediaManager.Current.Play(MediaItems).
Click on next button in player and go back to previous page.
Repeat Step 1

Configuration
Version: 0.5.9
Platform:

[x] :iphone: iOS
[x] :robot: Android
[x] :monkey: Xamarin.Forms

Can you try again with 0.6.2 and report back?

@martijn00  Not working even in 0.6.2, i am getting same exception.

@SatyaRamprasad should work in 0.6.3. Let me know

@martijn00 It's working. Thank you.


operator() is horrendously slow

I know this is not a bug but has to be reported. The MP2 assembly step becomes slower by a lot if I use BTAS' native operator().
(I previously wrote 50-100, but seems that was not quite right. It is slow, though.)

Do you mean x100 slower than nested loops with explicit offset computation
or than DGEMM? A code snippet would be useful.

See above. I will measure the timing more accurately.

the BTAS code I am talking about is the following, which does not seem to be written for efficiency. The timing follows (takes a lot as it needs to recompile the entire BAGEL)
      /// accesses element using its index, given as a pack of integers
      template<typename index0, typename... _args>
      typename std::enable_if<std::is_integral<index0>::value, const_reference>::type
      operator() (const index0& first, const _args&... rest) const
      {
        typedef typename common_signed_type<index0, typename index_type::value_type>::type ctype;
        auto indexv = {static_cast<ctype>(first), static_cast<ctype>(rest)...};
        index_type index = array_adaptor<index_type>::construct(indexv.size());
        std::copy(std::begin(indexv), std::end(indexv), std::begin(index));
        return storage_[ range_.ordinal(index) ];
      }

Code in BAGEL - I am talking about the loop in the middle (again, timing follows)
    for (int n = 0; n != nloop; ++n) {
      // take care of data. The communication should be hidden
      if (n+ncache < nloop)
        cache.block(n+ncache, n-1);

      const int i = get<0>(cache.task(n));
      const int j = get<1>(cache.task(n));
      if (i < 0 || j < 0) continue;
      cache.data_wait(n);

      shared_ptr<const Matrix> iblock = cache(i);
      shared_ptr<const Matrix> jblock = cache(j);
      const Matrix mat(*iblock % *jblock); // V
      Matrix mat2 = mat; // 2T-T^t
      if (i != j) {
        mat2 *= 2.0;
        mat2 -= *mat.transpose();
      }
      Matrix mat3 = mat; // T

      for (int a = 0; a != nvirt; ++a) {
        for (int b = 0; b != nvirt; ++b) {
          const double denom = -eig(a+nocc)+eig(i)-eig(b+nocc)+eig(j);
          mat2(b,a) /= denom;
          mat3(b,a) /= denom;
        }
      }

      const double fac = i == j ? 1.0 : 2.0;
      ecorr += mat.dot_product(mat2) * fac;
      dmp2->add_block(2.0, nocca, nocca, nvirt, nvirt, mat2 % mat3);
      if (i != j)
        dmp2->add_block(2.0, nocca, nocca, nvirt, nvirt, mat2 ^ mat3);
    }

It is most probably due to dynamic memory allocation in index construction.
When you know the number of dimensions parametrize tensor by std::array. I
do this when using btas with libint.
On Feb 9, 2015 3:06 PM, "Toru Shiozaki"<EMAIL_ADDRESS>wrote:

the BTAS code I am talking about is the following, which does not seem to
be written for efficiency. The timing follows (takes a lot as it needs to
recompile the entire BAGEL)
  /// accesses element using its index, given as a pack of integers
  template<typename index0, typename... _args>
  typename std::enable_if<std::is_integral<index0>::value, const_reference>::type
  operator() (const index0& first, const _args&... rest) const
  {
    typedef typename common_signed_type<index0, typename index_type::value_type>::type ctype;
    auto indexv = {static_cast<ctype>(first), static_cast<ctype>(rest)...};
    index_type index = array_adaptor<index_type>::construct(indexv.size());
    std::copy(std::begin(indexv), std::end(indexv), std::begin(index));
    return storage_[ range_.ordinal(index) ];
  }

—
Reply to this email directly or view it on GitHub
https://github.com/BTAS/BTAS/issues/75#issuecomment-73580007.

Actually the slowness exclusively came from View::operator(). In the above example, eig was a view, and changing that to double* made the timing from 2.0s to <0.1s.

Sorry maybe this could be partly my fault. I will figure it out (also I should default to std::array now).

we definitely need an alias for constexpr number of dimensions ... perhaps something like this:
/// Tensor with const number of dimensions
template <typename _T,
size_t _N,
CBLAS_ORDER _Order = CblasRowMajor,
class _Storage = btas::DEFAULT::storage<_T>,
class = typename std::enable_if<std::is_same<_T, typename _Storage::value_type>::value>::type
>
using TensorNd = Tensor<_T,
RangeNd<_Order, std::array<long, _N>, btas::BoxOrdinal<_Order,std::array<long, _N>>>,
_Storage
>;

View::begin() seems very slow, which was perhaps responsible for my problem. just for your info.


SAM-2464 the UI was modified in Sakai 10 and no longer has a label for Retract Date

https://jira.sakaiproject.org/browse/SAM-2464

Updated, squashed, and rebased.  Expanded scope of modification per @buckett


Handle irregularities between pySBD & pySBD + spaCy sentence output

pySBD spaCy pipeline component uses a token-based approach and sets is_sent_start to True or False depending on Spans obtained from pySBD character offsets. We create Span objects using doc.char_span method by creating a slice - doc.text[start:end] which is a sentence span whose first Token object needs to have attribute is_sent_start set to True. On the other hand, if the character indices don’t map to a valid span it returns None . Hence we get irregularities in pySBD & pySBD + spaCy sentence output.
The inability to get Span object from pySBD character offsets can be tackled using the deconstruction of Doc object like the way PKSHATechnology-Research/camphr authors have written get_doc_char_span which uses destruct_token

Fixed #63


Initialize PauliTerms with more than one Pauli op

In order to produce an PauliTerm  such as X0Y1Z5 one must specify each PauliTerm atomic element individually and multiply them together.  It would be easier to specify the tensor product in one go by passing a tuple of tuples representing the (operator, index) pairs.
Proposed mode of operation
pterm = PauliTerm([("X, 0), ("Y", 1), ("Z", 5)])

would be equivalent to the current way of constructing X0Y1Z5
pterm = PauliTerm("X", 0)*PauliTerm("Y", 1)*PauliTerm("Z", 5)

@ncrubin is the second way not ideal because it is annoying to type in the interpreter?  The shortcuts could be helpful for that, e.g.
pterm = sX(0)*sY(1)*sZ(5)
Or would the pain point more from needing to map from the strings "X", "Y", "Z" to the sX, etc. functions very often? Something like this snarky one liner might help?
terms_list = [("X", 0), ("Y", 1), ("Z", 5)]
terms = reduce(lambda x, y: x*y, [PauliTerm(*x) for x in terms_list])

We could wrap that instead in a separate function called something like term_from_list.  Would that work?  That would be preferable to adding a more complicated method signature to the PauliTerm init.

The multiplication of terms to construct a PauliTerm is inefficient--involves __mul__ which involves copying and returning a new PauliTerm.  Furthermore, the PauliTerm data structure seems to encompass tensor products of arbitrary size but can be constructed only by multiplying atomic elements.  It seems more useful, and more general, to allow construction of PauliTerms by non-atomic construction--avoiding building a sand castle one grain at a time.  Also, I don't think reduce is officially supported in python3 or considered pythonic (it was moved to functools).

I see your point, there's lots of redundant simplify calls. I can have the same method signature and add a classmethod:
pterm = PauliTerm.from_list([("X, 0), ("Y", 1), ("Z", 5)])

Let me know if there's a particular use case where that wouldn't work.

@ncrubin The implementation in #122 assumes that the terms are disjoint. I think that this is the use case you have in mind?  Or is it needed for there to be some smart simplification and allocation of a list where terms are repeated on multiple qubits?


be able to specify port and set connection string parameters on the wrapper

Is your feature request related to a problem? Please describe.
Yes
1- In our sql server we do not use the default port, so all the invoke-dbaquery or any module that tries to connect to the database fails
2- also even with having the port configured Im getting the following error,
"The certificate chain was issued by an authority that is not trusted"
3- also I was getting error on the policy command, not sure if this is something that we can ignore or not,
Set-ExecutionPolicy -Scope LocalMachine -ExecutionPolicy Unrestricted -Force
Set-ExecutionPolicy : Windows PowerShell updated your execution policy successfully, but the setting is overridden by a policy defined at a more specific scope.  Due to the override, your shell will retain its current effective execution policy of
RemoteSigned. Type "Get-ExecutionPolicy -List" to view your execution policy settings. For more information please see "Get-Help Set-ExecutionPolicy".
At line:1 char:5
Set-ExecutionPolicy -Scope LocalMachine -ExecutionPolicy Unrestri ...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CategoryInfo          : PermissionDenied: (:) [Set-ExecutionPolicy], SecurityException
FullyQualifiedErrorId : ExecutionPolicyOverride,Microsoft.PowerShell.Commands.SetExecutionPolicyCommand
Describe the solution you'd like
1- be able to specify the port on the wrapper
2- be able to set Trust Server Certificate= True as a workaround in the wrapper
3- Im not sure what is needed here
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.

Support for SQLInstances that connect only after specifying Port No is added.
SQLInstance names have to be passed like usual in Wrapper -

After SQLMonitor installation, the sql_instance & port_no would appear in different columns in dbo.instance_details table.

On SQLMonitor grafana dashboards, the SQLInstance appears without PortNo.


badge cli .output does not work

I can run badge build passed :green @flat and will get SVG output.  badge build passed :green .png @flat will not output anything. The same is true for just  badge build passed :green though everything after subject and status is optional.

Hi, have you tried installing imagemagick? On a Mac, you can run brew install imagemagick. That's what fixes this problem on my machine.

Seems likely that's the issue. If that doesn't solve it, please reopen.
The CLI should report an error instead of giving empty output. Let's track that in #914.


Image of sparrow

He has three legs! Three, Carl!

Clearly it isn't your typical wren, as normal wrens don't manage your TODOs either.


Separator for table direct children

Fixes #34732, closes #34764 as a replacement, basically refactoring the evolution from v4 instead of adding old code.
The main culprit here is getting back to a 2px border, since for whatever reason a 1px border is hidden behind cells borders. As pointed out by @adityadees, a 1.1 multiplicator would be enough, but feels like a magic number to me.
IMHO @mdo we'd better recommend to use our border utilities (eg. .border-dark in the initial issue, as in this dedicated CodePen) rather than fixing this. Any thought?

Demo on CodePen.

I feel like the new code is actually simpler somehow? I don't mind it as the path forward. Utilities could work, but ideally stuff like this works out of the box IMO. Maybe I made tables too opinionated in v5 😬

I feel like the new code is actually simpler somehow? I don't mind it as the path forward. Utilities could work, but ideally stuff like this works out of the box IMO. Maybe I made tables too opinionated in v5 😬

Nah, I think since v5 you reduce 2 to 1. But I don't know why?
That's why I just put 1.1 just to add second border bigger than first border without change initial value from v5.


improvement: karate JS API to start given mock feature

As of today we document this approach, but the time has come to make this a one-liner, especially since the netty stuff is bundled in core !
probably a karate.start({ mock: 'classpath:foo.feature', port: 8443, ssl: true, arg: { a: 1 } })

released 0.9.4


Consider deprecating variants

Proposal
I propose we deprecate the variants feature and remove it entirely in v4.0 of the ViewComponent framework.
Rationale
The ViewComponent project has supported Action Pack variants since at least v1.16, which allow you to specify multiple templates per component. The component chooses which template to use on render based on the current request variant. Variants were designed to support rendering different markup for mobile vs desktop, etc.
Unfortunately, variants have proven difficult to maintain. In ViewComponent, they work by defining multiple #call_* methods on the component class. Let's look at one of the issues I ran into recently that was exacerbated by variants. Components can inherit from other components, and if the child supports a particular variant but the parent does not (or vice versa), calling super to render the parent can lead to NoMethodErrors. It would be simpler to implement parent rendering if the component only had a single #call method.
A few more issues:

Variants introduce complexity in our test suite. We have tests to make sure Slim and HAML work with variants, for example.
Variants add complexity to the compiler, which is already one of the more complicated classes in the framework.

In my opinion, variants are a complex feature to support that bring very little value. For one thing, it is possible to replicate the existing behavior using a simple if statement in a component's template. But an even more important consideration should be that the same markup should work for multiple screen sizes. These days, modern CSS is more than capable of adding and hiding elements at specific breakpoints.
Thoughts?

Woops! I meant to file this in the ViewComponent repo 🤦

@camertron if you re-file in the VC repo, please also add rails label and get it onto the Primer teams backlog if you want us to discuss actioning on it. Otherwise, I don't think it'll be looked at 😄

@lesliecdubs for sure! I actually turned it into a discussion because I want to get community feedback before deciding to revert it or leave it in. If the community thinks we should deprecate it, I'll file an issue and get it on our board 👍


reqwest not found on armv7l-unknown-linux-gnueabihf and aarch64-unknown-linux-musl

Component:

Build

LSP version: 0.9.0
OS version and name: Void Linux

I am on the latest stable version of the extension/LSP.
I have searched the issues of this repo and believe that this is not a duplicate.

Issue
The reqwest feature division in 1e368ed9759671c5f4658dc37b186a1f9bdc9ff8 is incomplete, as it is missing some platforms. Simply adding more features as people report them missing is unsustainable, however. I'd suggest letting people choose their own TLS backend, either by passing the features directly (--features reqwest/rustls-tls) or passing it down for them:
[features]
rustls = ["reqwest/rustls-tls"]

Logs
   Compiling typst-lsp v0.9.0 (/builddir/typst-lsp-0.9.0)
error[E0432]: unresolved import `reqwest`
 --> src/workspace/package/external/repo.rs:7:5
  |
7 | use reqwest::{Client, Url};
  |     ^^^^^^^ use of undeclared crate or module `reqwest`

warning: unused import: `futures::TryStreamExt`
 --> src/workspace/package/external/repo.rs:6:5
  |
6 | use futures::TryStreamExt;
  |     ^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

error[E0433]: failed to resolve: use of undeclared crate or module `reqwest`
  --> src/workspace/package/external/repo.rs:94:24
   |
94 |     NotFound(#[source] reqwest::Error),
   |                        ^^^^^^^ use of undeclared crate or module `reqwest`

error[E0433]: failed to resolve: use of undeclared crate or module `reqwest`
  --> src/workspace/package/external/repo.rs:96:13
   |
96 |     Network(reqwest::Error),
   |             ^^^^^^^ use of undeclared crate or module `reqwest`

error[E0433]: failed to resolve: use of undeclared crate or module `reqwest`
   --> src/workspace/package/external/repo.rs:105:39
    |
105 |         let err = match Self::io_as::<reqwest::Error>(err) {
    |                                       ^^^^^^^ use of undeclared crate or module `reqwest`

error[E0433]: failed to resolve: use of undeclared crate or module `reqwest`
   --> src/workspace/package/external/repo.rs:137:53
    |
137 |         if err.get_ref().is_some_and(|err| err.is::<reqwest::Error>()) {
    |                                                     ^^^^^^^ use of undeclared crate or module `reqwest`

Some errors have detailed explanations: E0432, E0433.
For more information about an error, try `rustc --explain E0432`.
warning: `typst-lsp` (bin "typst-lsp") generated 1 warning
error: could not compile `typst-lsp` (bin "typst-lsp") due to 5 previous errors; 1 warning emitted

This should be fixed in the v0.9.1 release being built now. Per your recommendation, the TLS backend can be configured via features. The default is rustls. Thanks for the report and advice on fixing it!

thanks!


actually check out PR when building it

Event classes have _pr_id as the attribute while pr_id is a getter
property, so the EventData should parse _pr_id, not pr_id. Since I'm not
sure if some events parse pr_id, I want to keep things backwards compat.

When I didn't know what I was doing
I seriously don't understand what's going on. We are not checking out a
PR when we are building it. The worst is that all tests are passing and
all the code seems to be correct. But logs tell something else, can
anyone tell me what's wrong?
Here are the prod logs:
[2020-07-14 13:23:40,783: INFO/ForkPoolWorker-1] Task task.steve_jobs.process_message[81d16241-1292-4106-920b-9b851c626632] succeeded in 1.5510710068047047s: {'success': Tru
e, 'details': {'event': {'trigger': 'pull_request', 'created_at':<PHONE_NUMBER>, 'project_url': 'https://github.com/psss/tmt', '_pr_id': 269, 'git_ref': None, 'identifier': '26
9', 'action': 'synchronize', 'base_repo_namespace': 'FrNecas', 'base_repo_name': 'tmt', 'base_ref': '534ba1123b3a09663000b4e5d46be52cb2267d28', 'target_repo_namespace': 'pss
s', 'target_repo_name': 'tmt', 'commit_sha': '534ba1123b3a09663000b4e5d46be52cb2267d28', 'user_login': 'FrNecas', 'event_type': 'PullRequestGithubEvent', 'trigger_id': 1139}
, 'package_config': {'synced_files': {...}, 'upstream_package_name': 'tmt', 'actions': {...}, 'dist_git_namespace': 'rpms', 'notifications': {...}, 'jobs': [...], 'specfile_
path': 'tmt.spec', 'spec_source_id': 'Source0', 'config_file_path': '.packit.yaml', 'downstream_package_name': 'tmt', 'patch_generation_ignore_paths': [...], 'upstream_proje
ct_url': 'https://github.com/psss/tmt', 'dist_git_base_url': 'https://src.fedoraproject.org/', 'current_version_command': [...], 'upstream_tag_te...', ...}}}
...
13:23:40.788 abstract.py       DEBUG  Running handler <packit_service.worker.handlers.github_handlers.PullRequestCoprBuildHandler object at 0x7fd54c178fd0> for JobType.tests
obType.tests
13:23:41.820 reporting.py      DEBUG  Status reporter will report for GithubProject(namespace="psss", repo="tmt"), commit=534ba1123b3a09663000b4e5d46be52cb2267d28, pr=None
[2020-07-14 13:23:41,820: DEBUG/ForkPoolWorker-1] Status reporter will report for GithubProject(namespace="psss", repo="tmt"), commit=534ba1123b3a09663000b4e5d46be52cb2267d2
8, pr=None
13:23:41.820 reporting.py      DEBUG  Setting status for check 'packit/testing-farm-fedora-rawhide-x86_64': Building SRPM ...
[2020-07-14 13:23:41,820: DEBUG/ForkPoolWorker-1] Setting status for check 'packit/testing-farm-fedora-rawhide-x86_64': Building SRPM ...
13:23:42.406 reporting.py      DEBUG  Setting status for check 'packit/testing-farm-epel-8-x86_64': Building SRPM ...
[2020-07-14 13:23:42,406: DEBUG/ForkPoolWorker-1] Setting status for check 'packit/testing-farm-epel-8-x86_64': Building SRPM ...
13:23:45.469 reporting.py      DEBUG  Setting status for check 'packit/testing-farm-fedora-31-x86_64': Building SRPM ...
[2020-07-14 13:23:45,469: DEBUG/ForkPoolWorker-1] Setting status for check 'packit/testing-farm-fedora-31-x86_64': Building SRPM ...
13:23:45.908 reporting.py      DEBUG  Setting status for check 'packit/testing-farm-fedora-32-x86_64': Building SRPM ...
[2020-07-14 13:23:45,908: DEBUG/ForkPoolWorker-1] Setting status for check 'packit/testing-farm-fedora-32-x86_64': Building SRPM ...
[2020-07-14 13:23:46,352: DEBUG/ForkPoolWorker-1] Arguments received in the init method of the LocalProject class:
git_repo: None
working_dir: /sandcastle
ref: None
git_project: GithubProject(namespace="psss", repo="tmt")
git_service: None
git_url:
full_name:
namespace:
repo_name:
offline: False
refresh True
remote:
pr_id: None    <-- WHAT?!!!

why on earth is the commit sha set and pr_id not?

Happens for both pull requests from fork and local branches:

https://github.com/psss/tmt/pull/269
https://github.com/psss/tmt/pull/309

thanks for fixing it!

thanks for the review, fixing tests now


how to start using iTorch?

I have successfully installed iTorch, and I get the tree hierarchy display at localhost:8888 when I write torch notebook. however, have you mentioned how to start your own interactive session? the read-file says exactly what is mentioned on the github page.

I discovered the "new" button in the right corner so my problem is gone. Maybe its worth a small comment about it in your readme-file? (I dont think it has that)

thanks for the feedback, added a small note in the README


Hello

Good afternoon. I am a Linux engineer my name is Kirill. I was inspired by your product and the fact that it can deploy terminal environment and vdi on unix like system. Close examination of the product made me realize that openUDS does not work with the most popular PostgreSQL database and that there is no detailed manual on how to run the product, as well as in requirements.txt is not limited to versions of dependencies.
Important! All manipulations were performed on version 3.5.0
What I did:
Project:

Rewrote the connector from mysql to postgres
Fixed django settings.py file, added dotenv library
fixed constant in /usr/share/openuds/uds/core/init.ru changed from VERSION = '3.x.x-DEVEL to VERSION = '3.5.0'.
Built all required packages .deb .rpm .deb .rpm

Infrastructure:

Wrote playbooks for deploying openuds server + actor + nginx

Production stand

FreeIPA - LDAP
openUDS server 2 ( active/passive )
OpenUDS Actors 6 ( Pool ) 4. X2go as transport because it works over ssh
NFS Server
Postgres as sql

The problems encountered were:

When a user connects to the broker, it takes actors from the pool by priority and makes a record in the database. If at that moment the actor fails, the user is disconnected and when reconnecting the broker looks in the database about previously created connections and tries to connect to the server that is not in the network.
If there are > 2 actors in the pool, they will have different home folders, which is not very good when the situation I described above happens. I have deployed NFS server and located there user directories. And used the standard FreeIPA automount tools. And it worked. But still the user home folders had to be created manually on the NFS server, as well as assign an owner to the folder, because the built-in mechanism in linux skelet did not work and did not create folders.
I could not manage sessions in any way, users can throw their sessions and not close them, and this can affect the performance of actors. And also it can be done manually, but I didn't like it.

So I wrote a small golang program called watcher that allows me to cover some of my needs:

It goes to FreeIpa and collects the list of users in the group, as well as their gui/uid and creates home folders for them on the nfs server
If a user's home folder has not been modified for a long time, watcher removes it from the NFS server.
In the configuration file is set a parameter on the duration of the session, if the user left the session, then within 4 hours watcher closes it.
If the user decided to connect directly through x2go directly to the actor, watcher monitors such connections and terminates the session.
watcher can assign user quotas according to those set in the configuration file. It can work with both xfs and ext4 quotas. Automatically understands it and assigns according to the deployed file system.
All user sessions are outlined in the web interface, as well as a hung session can be terminated from the web.
Authentication on the web is done via LDAP + JWT token

Roadmap:

Archiving user home directories before deletion, and possibly uploading them to s3
Prepare Dockerfile

Seems like a lot of work... :)
The fact it's not working with postgresql is lack of time for testings in fact, but as long as Django supports it, there should be not a big problem with that..
What changes did you made?
Also, what do you mean with "actor".. For me, the actor is the "agent" that runs on the vms...
I am currently making "heavy changes" in 4.0 (refactoring, migrating code to snake_case instead of camelCase (easier to read now for me, not so easy a few years ago :) ), and i have the intention to work on a "linux application server actor", in fact, i have started it already, but a long way to go (because i'm also rebuilding from scratcg standard actor for 4.0 release i hope)
Thank you very much for let me know about your work. If i can help in anything, please, let me know (notice that i have included, on 4.0, support for FreeIPA, thanks to Alexander that made it ;-)
Maybe some changes can be commited (if not most) to the mainstream of the 4.0, and ofc, the documentation of how to install and manage it... it's something that is needed a long time ago, but again, lack of time to do it.
Again, thank you very much!!
Anything i can do, please, let  me know...

Hi, by actor I mean uds-actor, the terminal server carrying the payload.
Yes, I know that Django natively works with postgres for this reason I thought it should not be a problem to add psycopg2==2.9.1 and python-dotenv to the requirements.txt file (the screenshot shows a library to read the parameters from the .env file so you can change them during testing). I am not a python developer, just devops, but can write in golang. I rewrote the connector to postgres for tunnel (see screenshot) .

I don't think there is anything hard for a developer there. Exploitation of openuds on postgresql subcode has been more than 6 months in production environment. The only problem occurred with x2go and mate shell conflict. Sessions were showing a black screen. For this reason I got tired of manually terminating the session and wrote a watcher that detects the number of usd-actors and terminates them. I chose x2go because it runs on top of ssh and it doesn't need to allocate a separate port and disturb my security department.
My watcher is designed in such a way that it covers some of my needs that I encountered when architecting and running the product. Because the goal was to make a fault tolerant solution.
Unfortunately I did not build version 4.0, I needed to build a production environment from a more stable version for my users to replace the windows stack.
I have connected openuds server to freeipa via "Regex LDAP Authenticatior" it works 100%. I understand that you don't have time for everything, doing such a big project in one person is very hard and time consuming and there are other things to do. I am grateful for this product and if you need my help I would be happy to help. I think a good solution for you would be to write a Dockerfile that would allow you to quickly deploy openuds for testing and development. Maybe my wish would be to move the client component to golang to have less dependencies on the client side.

If your postgresql works fine, and you have been using it in production for such a long time without incidents (did the reports work fine for you?, this is where the "most strange" part of sql queries are. In 4.0, there are a lot of fixes with this also, but currently 4.0 is far from production ready, i have a lot of work to do... :) ), we can include the support for it directly. That is, include the requirements, and in the sample, include a default config so anyone can benefit from it.
With relation to shell, stuck sessions, etc.. What Provider are you using?, it's always possible to generate a customized one (or improve existing one) that allows some tasks (for example, before removal...)
The client part in golang, is something that i have been thinking about for a while. It's mainly in python for coherence (For example, i have a version of the tunnel in go lang, and another one in c++, but the "global" performance is very similar (in fact, golang processes the "open connection" stage infinitely faster than the others, but one it's stablished, there is low difference.
The idea also of python is to be able to update the "transports scripts" from UDS, and i also have been thinking to port them to something like lua (as long as they are signed, there is no problem with the language used). I'm including some changes for next 4.0 release, and will see in a future, but as long as we can execute these "transport scripts" on clients, a golang version should be a good one.
Relative to dependencies, we can always build the "portable" versions, but golang will remove a lot of issues on any plaform, i'm sure of it ;-)
I hope that after this summer (2024), 4.0 will be available as the current stable. I have refactored lots of code (most of methods, i hope all), included new mechanics (servers, that allows a more fine control of some environments), i wont to make a generic "LinuxAppServer" to be available, but currently only testing things around, allowing us to give "1 server for many users" consistently, and probably include some of the characteristics that you comments on your watcher...)
Again, thanks a lot for sharing your experience ;-)

I didn't use the reports. My task was to provide employees with a non-windows terminal server so that they could work with corporate documents on the company's hardware. As for the provider, I only used Static IP Machines Provider. But I don't think that's the problem with it, since most of the problems are related to x2go and X11. Hotkeys and image sticking. I believe in you that version 4.0 will be excellent.
I have not tested the performance of the tunnel in different programming languages, but I suggested the client component for one simple reason, it is difficult for users to install a python interpreter on their personal computer, and golang is compiled into a binary file or in .exe depending on the platform, which is easier to distribute. It seems that there are libraries for python that allow you to perform such actions with it.
As for the general architecture, there is no need to focus only on python, since it is possible to build component communication through the REST API or gRPC. I am currently studying this technology and would like to apply it to watcher. This would allow me to terminate sessions directly on uds-actor, rather than via ssh connect
I'm sorry, I don't know English perfectly and I communicate with you through a translator and some points are not completely clear to me, what do you mean about LinuxAppServer?

Don't worry, the translations is very good :).
The Linux App Server is basically an specialized actor (or agent), for allowing the same that an MS RDS server, that is: terminal sessions on Linux servers...
All of this with native load balancing (based on real load), session control, messaging, etc...
Will allow to, for example, when done, to create an specialized version to use docker to isolate user sessions, tunneling external connections to the correct container (this is the last part i'll implemenet, to be honest :) ), or simply execute the application locally.
I think it's very similar to your current use, but with an specialized agent (so we can control logins, session use, etc...)
Hope i'm clear enough :)

Yes, thank you, you explained it very clearly. I just had thoughts of encapsulating Static IP Machines Provider in an LXC container, it looks more like a full-fledged linux than docker containers. I want to thank you again for your product, it is far from ideal, but it is going in the right direction. If you need my help, I will be happy to contribute to openuds. I have opened my watcher repository for you so that you can understand how it works. =)

Again, thanks for your offering ;-)
I'll take a close look to your watcher, sure i can take something for the LinuxAppServer that i want to bring.


Mainnet Hotfix: 2FA fixes

Configurable gas for 2FA confirm
Make sure info about function call contains deposit amount

@kcole16 do these e-mail copy changes look good? Do we need any other copy adjustments?


I have added the unityandroidpermissions.aar and AndroidPermissionsManager.cs to my Unity project. I have copied the example code and adjusted it to my project. I can call IsPermissionGranted without any problem, but when I call RequestPermission I get no callback whatsoever. After the call absolutely nothing happens.
I guess it's because I have missed something...probably some change in the manifest file. I can see discussions on if the manifest file should be replaced or merged, but haven't a clue what I need to do in order for either of that to happen.
The document says under "How to build":  "Run gradlew assemble from src/UnityAndroidPermissions/"
What is that? Do I need to build, and if so - what am I building?  Is it the "gradlew" file that is the "gradlew assemble"? How do I run that? I have tried to run "gradlew.bat"  which downloaded a ton of files and then ended with a "build failed" message.
What am I missing?

The settings are in the manifest and I get a popup where I can approve/deny the request. But no matter what I do, I get no callback.
Anyhow, I now use another package that works, so this is no longer an issue for me.


Tried to ingest GDAX data for backtesting purposes using this command in a command window, with the catalyst virtual environment active.
catalyst ingest-exchange -x gdax -f daily -i btc_usd
What happened instead?
I got the first status message
Trying to ingest exchange bundle gdax...
but no download progress bar appeared (which happens for the three fully-supported exchanges), and the code finished with no error. Only metadata.json was created in the /gdax/daily_bundle/ folder.

Here is how you can reproduce this issue on your machine:
Reproduction Steps

open cmd.exe
run activate catalyst
run catalyst ingest-exchange -x gdax -f daily -i btc_usd

What steps have you taken to resolve this already?
Tried minute frequency, but got same result.
Anything else?
Nope
Sincerely,
Alex

Hi @amarvin ,
Please refer to this market coverage website which holds the current available historical data. At the current moment Bitifnex, Poloniex and Bittrex historical data is supported but we are actively working to add more exchanges.
Lena

Thanks for the quick response lenak25. Can you add an ear error or print statement then to say the requested exchange isn't yet supported for ingest-exchange?

Thanks @amarvin , it is indeed required to avoid confusion. We will address this.


ProductAPIs section should have small overview of product APIs

Location : https://apim.docs.wso2.com/en/latest/Develop/ProductAPIs/publisher-v1/

@malinthaprasan

An overview page listing the available API's have been added at https://apim.docs.wso2.com/en/3.0.0/develop/product-apis/restful-apis/. In addition to this, the 3.1.0 space also includes getting started guides for each API.
Please feel free to reopen if the information in the doc is not adequate.


Crash: infer from usage on create-react-app

Simplified from create-react-app/packages/react-dev-utils/typescriptFormatter.js:
Code
function formatter(message/**/) {
  const { type } = false ? { type: message } : message;
}

Request codefixes at /**/
Expected behavior:
No crash, plus some jsdoc type for message.
Actual behavior:
Crash:
TypeError: Cannot read property 'flags' of undefined
    at Object.getCheckFlags (/home/nathansa/ts/built/local/tsserver.js:12910:23)
    at getTypeOfSymbol (/home/nathansa/ts/built/local/tsserver.js:37460:20)
    at getTypeOfNode (/home/nathansa/ts/built/local/tsserver.js:60574:24)
    at Object.getTypeAtLocation (/home/nathansa/ts/built/local/tsserver.js:32271:31)
    at inferTypeFromPropertyAssignment (/home/nathansa/ts/built/local/tsserver.js:117165:60)
    at inferTypeFromContext (/home/nathansa/ts/built/local/tsserver.js:116983:25)
    at inferTypeFromCallExpressionContext (/home/nathansa/ts/built/local/tsserver.js:117124:17)
    at inferTypeFromContext (/home/nathansa/ts/built/local/tsserver.js:116969:29)
    at inferTypeFromPropertyAccessExpressionContext (/home/nathansa/ts/built/local/tsserver.js:117138:17)
    at inferTypeFromContext (/home/nathansa/ts/built/local/tsserver.js:116976:25)
    at inferTypesFromReferences (/home/nathansa/ts/built/local/tsserver.js:116885:21)
    at /home/nathansa/ts/built/local/tsserver.js:116922:40
    at Array.map (<anonymous>)
    at Object.inferTypeForParametersFromReferences (/home/nathansa/ts/built/local/tsserver.js:116902:47)
    at annotateParameters (/home/nathansa/ts/built/local/tsserver.js:116709:58)
    at doChange (/home/nathansa/ts/built/local/tsserver.js:116669:25)
    at /home/nathansa/ts/built/local/tsserver.js:116570:109
    at Function.ChangeTracker.with (/home/nathansa/ts/built/local/tsserver.js:114937:17)
    at Object.getCodeActions (/home/nathansa/ts/built/local/tsserver.js:116570:64)
    at /home/nathansa/ts/built/local/tsserver.js:115958:121
    at Object.flatMap (/home/nathansa/ts/built/local/tsserver.js:567:25)
    at Object.getFixes (/home/nathansa/ts/built/local/tsserver.js:115958:23)
    at /home/nathansa/ts/built/local/tsserver.js:126009:35
    at Object.flatMap (/home/nathansa/ts/built/local/tsserver.js:567:25)
    at Object.getCodeFixesAtPosition (/home/nathansa/ts/built/local/tsserver.js:126007:23)

Also crashes in prettier/src/language-html/parser-html.js -- very likely for the same reason. Here's a simplified repro:
function _parse(text) {
  const { frontMatter, content } = shouldParseFrontMatter
    ? parseFrontMatter(text)
    : { frontMatter: null, content: text };
}

Doesn't repro on 3.5


System call detection is disabled during temporal/hybrid tracing

When temporal/hybrid tracing modes are used, the parent process detached from the child, and as a result, it can not track system calls (an split trace accordingly). There is not need to detach, we just need to disable monitoring, register a sigalarm and enable it back once the signal is received.

The different tracing methods are implemented in the same function. I'd be good to separate them in different functions for readability.

Fixed by @ArnauBigas some time back.


get request return plain html

lead_info = closeio_client.get('lead', query: recipient)
Return me plain html :/
Tried the same query with postman and it looks ok..
https://app.close.io/api/v1/lead?query=recipient%3Aran%40test.com
Do you have idea ?
(other queries in same session are working)
I, [2018-05-31T12:16:29.092320 #56528]  INFO -- : get https://app.close.io/api/v1/lead?query=recipient%3Aran%40test.com
D, [2018-05-31T12:16:29.092550 #56528] DEBUG -- request: Accept: "application/json"
User-Agent: "closeio-ruby-gem/v3.0.1"
X-TZ-Offset: "0"
Authorization: "Basic Njg1ODdjODBkMWE4MTk3MmFmZWU2MjJjZjBmM2ExOWU1MmU3NjQyMDQ5Mzc0ZGI0YTRmZDlmYjQ6"
Faraday::ParsingError: 765: unexpected token at '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<title>Redirecting...</title>

Redirecting...

You should be redirected automatically to target URL: https://app.close.io/api/v1/lead/?query=recipient%3Aran%40test.com

Try calling it like this:
lead_info =<EMAIL_ADDRESS>

@alexey Is this still an issue?

@taylorbrooks hi ! not anymore, as i remember your example solved me the issue, sorry forgot to update


Spark fetcher is now able to fetch event logs via REST API

This PR allows Dr. Elephant to fetch Spark logs without universal
read access to eventLog.dir on HDFS. SparkFetcher would use SparkRestClient
instead of SparkLogClient if configured as
<params>
  <use_rest_for_eventlogs>true</use_rest_for_eventlogs>
</params>

The default behaviour is to fetch the logs via SparkLogClient/WebHDFS.
Closes #199

What is missing?

[ ] Documentation
[x] Tests

Thanks @superbobry for this change. I am reviewing it.
@paulbramsen has also been looking this issue. I think he should also review this change.

@shkhrgpt thank you for the review. I will address your comments tomorrow and probably tackle the tests as well.
Do I need to update user docs on the wiki with a description of the new fetcher param?

@superbobry I think you should first starting adding tests before updating user docs. I think that can be done once this change is in the final stage.

A slightly unrelated question: we have two Spark versions deployed: 1.X and 2.X and we would like to aggregate data from both. It looks like this should be possible if we parameterize the SparkFetcher with SparkConf location. What do you think?

Yeah, we also thought about it.
I believe you have two different Spark History Servers (SHS) for two different version of Spark? As far as I can think, one instance of Dr Elephant can only get data from one SHS (address of SHS comes from the configured SPARK_HOME or SPARK_CONF_DIR). Therefore, I believe you will have to run two Dr Elephant instances. And each instance can have different SPARK_HOME or SPARK_CONF_DIR based on what SHS it's trying to contact. Both instances can write results to sane DB. So I don't you need to make any change in SparkFetcher to support two different versions of Spark.
Did I answer your question in the right direction or you have something else in your mind?

I'm just curious, why all the client/cluster mode copy-paste in SparkRestClientTest? Why isn't it enough to define the server fixture once?

Yeah, I agree that there is a lot of duplicate code in SparkRestClientTest, and it should be fixed. However, I would encourage you to fix that in separate PR, Making lot more changes in one PR can make the review a little difficult.
I do have an idea for client mode. In the client mode, rather than generating ZipOutputStream, directly respond a zip file. To do that, you can just create a zipped file of spark_event_logs/event_log_2 in spark_event_logs directory, and provide the path of the file in LogDataResource.
What do you think?

@superbobry Btw, the change looks very good now. I just had a few more comments. Thank you very much for addressing my earlier comments.

I do have an idea for client mode. [...] What do you think?

I've decided not to do it, because ZIP-file generation is a method and can be shared between client/server mode tests.
I've also cherry-picked the Guava cleanup commit out of this PR. Will submit in a different one not to clutter the diff.

There is one more issue with the current code: if use_rest_for_eventlogs is enabled, then SparkFetcher would always try to fetch the logs, ignoring the value of "spark.eventLog.enabled".

@superbobry Thanks for including spark.eventLog.enabled into the logic.
@shankar37 @akshayrai Can you guys also please review this change. LGTM.

@shankar37 and @akshayrai
Can you please review this change. This is very important and useful change.
Thank you.

@shankar37 and @akshayrai is there anything left to do in this PR?

+1 LGTM except for the one comment

Merged! Thanks @superbobry

The only remaining thing is to update the docs, but I think I cannot do it (not being a member of the organisation), can I?

Apparently no. Can you share a google doc with us?

What do you think about making the docs part of the repo and publishing them via GitHub Pages? This would make contributions easier.
Also, is there a Wiki page documenting configuration? The only mention of FetcherConf.xml I've found is in "Project Structure".

@superbobry, Github Pages looks interesting and I am totally for it. We should definitely move the documentation away from github wiki so that everyone can contribute.
The configurations are part of the respective sections like "Configuring the Heuristics" under Heuristics and "Configuring Schedulers" under Schedulers. I don't think we have a wiki for Configuring the Fetchers.


Added options for additional debug information

What
Added debug options to the java compilation
Why
Improve the debug experience see #52
How
Added gradle compileJava debug options
Testing
Validated that additional debug information is present in compiled jars
reviewer @rhyshort
reviewer @emlaver

+1

+1


Regression: mouse wheel unusable in scrollviewer containing stackpanel in v1.6

Describe the bug
If a scrollviewer contains a stackpanel, the mouse wheel should be able to scroll it. This works in v1.5, but not v1.6
Steps to reproduce the bug

Install MSI from https://github.com/OpenKneeboard/OpenKneeboard/actions/runs/10832469563
Go to settings -> advanced
Try to scroll with wheel
Does not scroll
Use scrollbar, scrolls

Expected behavior
Scroll wheel should scroll.
This matches the behavior on v1.5, e.g. https://github.com/OpenKneeboard/OpenKneeboard/commit/ae0536617493f65385c2dd7df01a223c640f5edc fixes it (CI build at https://github.com/OpenKneeboard/OpenKneeboard/actions/runs/10832950077 shortly)
Screenshots
No response
NuGet package version
None
Windows version
Windows 11 (22H2): Build 22621
Additional context
XAML is here: https://github.com/OpenKneeboard/OpenKneeboard/blob/master/src/app/app-winui3/AdvancedSettingsPage.xaml

We are also impacted by this regession. Are you able to reproduce this? What kind of additional info would be helpful to you?

I have not been able to repro this issue using this markup, inspired by your  https://github.com/OpenKneeboard/OpenKneeboard/blob/master/src/app/app-winui3/AdvancedSettingsPage.xaml:
<Page
    ...
    Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
    <ScrollViewer VerticalScrollMode="Auto"
                  Padding="24">
        <StackPanel
          Orientation="Vertical"
          Spacing="16">
            <TextBlock
              Text="Multiple Views"
              Style="{ThemeResource SubtitleTextBlockStyle}"/>
            <StackPanel Orientation="Vertical"
                        Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
                        BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
                        CornerRadius="4"
                        BorderThickness="1"
                        Padding="8"
                        Spacing="12">
                <ToggleSwitch
                  Header="Change the active view by looking"
                  OffContent="Bindings and pen strokes always affect the first view"
                  OnContent="Bindings and pen strokes affect the view you're looking at"
                  />
                <TextBlock
                  Style="{ThemeResource CaptionTextBlockStyle}"
                  Foreground="{ThemeResource TextFillColorSecondary}">
                    Both kneeboards use the same set of tabs, but track the active tab
                    and pages separately. Buttons and pen strokes always go to the
                    primary kneeboard - bind a button to switch kneeboards to control
                    the second kneeboard.
                </TextBlock>
                <ComboBox
                  Header="App window view"
                  >
                    <x:String>Ask later</x:String>
                    <x:String>In-game active view (flight sims)</x:String>
                    <x:String>Independent view (overlays, racing)</x:String>
                </ComboBox>
                <TextBlock
                  Style="{ThemeResource CaptionTextBlockStyle}"
                  Foreground="{ThemeResource TextFillColorSecondary}">
                    The app window can show and control the active in-game view
                    (for VR, this is whichever you looked at most recently), or it can
                    be independent. This changes the behavior of tab/page changes,
                    including button bindings if the OpenKneeboard window is the
                    foreground window.
                </TextBlock>
                <TextBlock
                  Style="{ThemeResource CaptionTextBlockStyle}"
                  Foreground="{ThemeResource TextFillColorSecondary}">
                    If you use tabs with multiple pages, or more tabs than views
                    (common with flight simulators), you probably want
                    'In-game active view'. Moving between tabs or pages in the app
                    window will also change the current tab or page in-game.
                </TextBlock>
                <TextBlock
                  Style="{ThemeResource CaptionTextBlockStyle}"
                  Foreground="{ThemeResource TextFillColorSecondary}">
                    If you want each view to always show the same tab, and each
                    tab only has one page (e.g. sim racing overlays), you probably
                    want 'Independent view'. Moving between tabs or pages in the app
                    window will not affect what you see in the game.
                </TextBlock>
            </StackPanel>
            <TextBlock
              Text="Mouse button bindings"
              Style="{ThemeResource SubtitleTextBlockStyle}"/>
            <StackPanel Orientation="Vertical"
                        Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
                        BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
                        CornerRadius="4"
                        BorderThickness="1"
                        Padding="8"
                        Spacing="12">
                <ToggleSwitch
                  OffContent="Disabled"
                  OnContent="Enabled"
                  />
                <TextBlock
                  Style="{ThemeResource CaptionTextBlockStyle}"
                  Foreground="{ThemeResource TextFillColorSecondary}">
                    Allows binding mouse buttons in the "Input Settings" page; this is
                    disabled by default as it is rarely used, but a common source of
                    problems.
                </TextBlock>
            </StackPanel>
            <TextBlock
              Text="Profiles"
              Style="{ThemeResource SubtitleTextBlockStyle}"/>
            <StackPanel Orientation="Vertical"
                        Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
                        BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
                        CornerRadius="4"
                        BorderThickness="1"
                        Padding="8"
                        Spacing="12">
                <ToggleSwitch
                  OffContent="Single profile"
                  OnContent="Multiple profiles"
                  />
            </StackPanel>
            <TextBlock
              Text="Bookmarks"
              Style="{ThemeResource SubtitleTextBlockStyle}"/>
            <StackPanel Orientation="Vertical"
                        Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
                        BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
                        CornerRadius="4"
                        BorderThickness="1"
                        Padding="8"
                        Spacing="12">
                <ToggleSwitch
                  OffContent="Disabled"
                  OnContent="Enabled"
                  />
            </StackPanel>
            <TextBlock
              Text="Looping"
              Style="{ThemeResource SubtitleTextBlockStyle}"/>
            <StackPanel Orientation="Vertical"
                        Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
                        BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
                        CornerRadius="4"
                        BorderThickness="1"
                        Padding="8"
                        Spacing="12">
                <ToggleSwitch
                  Header="Pages"
                  OffContent="Pages do not loop"
                  OnContent="First and last pages loop"
                  />
                <ToggleSwitch
                  Header="Tabs"
                  OffContent="Tabs do not loop"
                  OnContent="First and last tabs loop"
                  />
                <ToggleSwitch
                  Header="Profiles"
                  OffContent="Profiles do not loop"
                  OnContent="First and last profiles loop"

                  />
                <ToggleSwitch
                  Header="Bookmarks"
                  OffContent="Bookmarks do not loop"
                  OnContent="First and last bookmarks loop"

                  />
                <TextBlock
                  Style="{ThemeResource CaptionTextBlockStyle}"
                  Foreground="{ThemeResource TextFillColorSecondary}">
                    By default, 'Previous Page' is disabled on the first page, and
                    'Next Page' is disabled on the last page. Alternatively, pages can
                    loop so that if you're on the first page, 'Previous Page' will take
                    you to the last page, and if you're on the last page, 'Next Page'
                    will take you to the first page. Looping is similarly supported for
                    tabs, profiles, and bookmarks;
                </TextBlock>
            </StackPanel>
            <TextBlock
              Text="Tint and brightness"
              Style="{ThemeResource SubtitleTextBlockStyle}"/>
            <StackPanel Orientation="Vertical"
                        Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
                        BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
                        CornerRadius="4"
                        BorderThickness="1"
                        Padding="8"
                        Spacing="12">
                <ToggleSwitch
                  Header="Enabled"
                  OffContent="Full brightness, no tint"
                  OnContent="Custom tint and brightness"
                  />
                <Slider
                  Header="Brightness"

                  TickPlacement="Outside"
                  TickFrequency="5"
                  />
                <TextBlock
                  Text="Tint color - use white for no tint"
                  Style="{ThemeResource BodyTextBlockStyle}"/>
                <ColorPicker

                  ColorSpectrumShape="Ring"/>
            </StackPanel>
            <Grid ColumnDefinitions="*, Auto">
                <TextBlock
                  Grid.Column="0"
                  Text="Drawing"
                  Style="{StaticResource SubtitleTextBlockStyle}"/>
                <Button
                  Grid.Column="1"
                  Content="Restore defaults"
                  />
            </Grid>
            <StackPanel
              Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
              BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
              CornerRadius="4"
              BorderThickness="1"
              Padding="8"
              Spacing="12">
                <Slider
                  Header="Minimum pen stroke size"

                  TickPlacement="Outside"
                  TickFrequency="5"
                  StepFrequency="1"
                  Maximum="50"
                  Minimum="0"/>
                <Slider
                  Header="Pen sensitivity"

                  TickPlacement="Outside"
                  TickFrequency="5"
                  StepFrequency="1"
                  Maximum="50"
                  Minimum="0"/>
                <Slider
                  Header="Minimum eraser size"

                  TickPlacement="Outside"
                  TickFrequency="50"
                  StepFrequency="1"
                  Maximum="300"
                  Minimum="0.0"/>
                <Slider
                  Header="Eraser sensitivity"

                  TickPlacement="Outside"
                  TickFrequency="100"
                  StepFrequency="1"
                  Maximum="500"
                  Minimum="1.0"/>
            </StackPanel>
            <Grid ColumnDefinitions="*, Auto">
                <TextBlock
                  Grid.Column="0"
                  Text="Text"
                  Style="{StaticResource SubtitleTextBlockStyle}"/>
                <Button
                  Grid.Column="1"
                  Content="Restore defaults"
                  />
            </Grid>
            <StackPanel
              Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
              BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
              CornerRadius="4"
              BorderThickness="1"
              Padding="8"
              Spacing="12">
                <Slider
                  Header="Font size"

                  TickPlacement="Outside"
                  TickFrequency="5"
                  StepFrequency="1"
                  Maximum="30"
                  Minimum="6"/>
            </StackPanel>
            <TextBlock
              Text="In-Game Interface"
              Style="{ThemeResource SubtitleTextBlockStyle}"/>
            <StackPanel Orientation="Vertical"
                        Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
                        BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
                        CornerRadius="4"
                        BorderThickness="1"
                        Padding="8"
                        Spacing="12">
                <ToggleSwitch
                  Header="Header and toolbar"
                  OffContent="No in-game header or toolbar"
                  OnContent="In-game header and toolbar are shown"
                  />
                <ToggleSwitch
                  Header="Footer and clock"
                  OffContent="No in-game footer or clock"
                  OnContent="In-game footer and clock are shown"
                  />
                <ToggleSwitch
                  Header="Frame counter in footer"
                  OffContent="Frame counter is not shown"
                  OnContent="The number of OpenKneeboard frames is shown"

                  />
            </StackPanel>
            <Grid ColumnDefinitions="*, Auto">
                <TextBlock
                  Grid.Column="0"
                  Text="Compatibility quirks"
                  Style="{StaticResource SubtitleTextBlockStyle}"/>
                <Button
                  Grid.Column="1"
                  Content="Restore defaults"
                  />
            </Grid>
            <StackPanel
              Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
              BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
              CornerRadius="4"
              BorderThickness="1"
              Padding="8"
              Spacing="12">
                <ComboBox
                  Header="Elevation"

                  >
                    <x:String>Run elevated if launched elevated</x:String>
                    <x:String>Run elevated</x:String>
                    <x:String>Run as normal user</x:String>
                </ComboBox>
                <TextBlock
                  Style="{ThemeResource CaptionTextBlockStyle}"
                  Foreground="{ThemeResource TextFillColorSecondary}">
                    This reduces performance, but can workaround flickering issues
                    caused by bugs in other OpenXR components.
                </TextBlock>
                <ToggleSwitch
                  Header="Legacy Oculus API (LibOVR): Discard depth information"
                  OffContent="Disabled - keep depth information"
                  OnContent="Enabled - discard depth information"
                  />
                <TextBlock
                  Style="{ThemeResource CaptionTextBlockStyle}"
                  Foreground="{ThemeResource TextFillColorSecondary}">
                    If the OpenKneeboard is not visible in games using the legacy Oculus
                    API (LibOVR), this may fix it; however, when things work correctly
                    without it, it may significantly reduce the quality of reprojection.
                </TextBlock>
                <TextBlock
                  Style="{ThemeResource CaptionTextBlockStyle}"
                  Foreground="{ThemeResource TextFillColorSecondary}">
                    When this option helps, it indicates a bug in the game, the active
                    OVR runtime, or another mod.
                </TextBlock>
                <ComboBox
                  Header="OpenXR: Upscale images"
                  >
                    <x:String>Automatic (Varjo only)</x:String>
                    <x:String>Leave for OpenXR runtime</x:String>
                    <x:String>Always</x:String>
                </ComboBox>
                <TextBlock
                  Style="{ThemeResource CaptionTextBlockStyle}"
                  Foreground="{ThemeResource TextFillColorSecondary}">
                    Increases the resolution of content before passing to the OpenXR
                    runtime; runtimes are theoretically able to produce better results
                    than OpenKneeboard can, but in practice OpenKneeboard produces better
                    results than some vendors.
                </TextBlock>
            </StackPanel>
        </StackPanel>
    </ScrollViewer>
</Page>

I also installed the app and went through the steps:

Install MSI from https://github.com/OpenKneeboard/OpenKneeboard/actions/runs/10832469563
Go to settings -> advanced
Try to scroll with wheel
No repro either.  So I'm closing this issue.

Do you have suggestions for things we could look into to narrow this down? It is somewhat disheartening to have a regression ignored for months then closed with "works on my machine".


invalid code from app for any user

i'm creating the google authenticator profile for the user.
below are the steps:
[root@hostname /]# adduser testpam
[root@hostname /]# passwd testpam
Changing password for user testpam.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
[root@hostname /]# su testpam
[testpam@VMPAMAPD07 /]$ google-authenticator
Do you want authentication tokens to be time-based (y/n) y
Warning: pasting the following URL into your browser exposes the OTP secret to Google:
https://www.google.com/chart?chs=200x200&chld=M|0&cht=qr&chl=otpauth://totp/testpam@VMPAMAPD07%3Fsecret%3DOMQT6DPO2ZMQACZOIZ77C2EBUY%26issuer%3DVMPAMAPD07
Your new secret key is: OMQT6DPO2ZMQACZOIZ77C2EBUY
Enter code from app (-1 to skip): 517443
Code incorrect (correct code 029240). Try again.
Enter code from app (-1 to skip):
Here's the thing:
it always says incorrect code though its really what the code from my google app on mobile..
the server is sync with NTP.'
the mobile phone is also sync... same with the server time.
date is also the same..
i re-run the ./bootstrap , configure make and make install.. still the same..
wanted to remove all google authenticator but no uninstall..
version
Rhel 7.5
from test environment it worked..
on prod.. this is the issue..
cant find other ways.. rebuild of server is not an option...
thank you

Provisioning code has no dependencies at all, and it's very strange that it wouldn't work.
That's why I say triple-check NTP. Also you could try copying the google-authenticator binary from dev to prod, in case your prod build machine has something broken.

… no dependencies including does not use the network at all.

… no dependencies including does not use the network at all.

thanks thomas... its really the time... tried to run ntpdate... unable to find ntp servers... i think it because of firewall...ntp ports are not allowed...
i manually set the time..same with the dev... found to have 3 mins difference... which is 180 seconds delayed...
its working now ^_^


add Header and Footer component

This PR will add code for the Header and Footer component
In this PR, converted header and footer from HTML to react code
Don't go on the number of additions, it is showing like this because of package-lock.josn file
Please review and give your feedback

Thank you for reviewing,


[link]Change links for setup file till k8s-configuration module

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

For new extensions:

[ ] My extension description/summary conforms to the Extension Summary Guidelines.

About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your PR is merged into master branch, a new PR will be created to update src/index.json automatically.
The precondition is to put your code inside this repo and upgrade the version in the PR but do not modify src/index.json.

k8s


Code - app_project_mini Component

Todo

[x] Code - app_project_mini component

@input #3
@input #6
[x] code app_project_mini
@output app_project_mini_v0.1.0

- tasks 2024.01.27

Update app_project_mini_v0.1.0

update the app_project_mini component
@output :package:  app_project_mini_v0.1.1

worklog
worklog-196

feedback

proposals


Multiple cookies can have the same name

Due to my own errors I ended up in a situation where two cookies had the same name. With a little bit of googling I realised this was something that is part of the RFC (linked in this stackoverflow answer).
But the default in Flask (from the defaults of werkzeug) is to support only one cookie with the same name. It is fairly easy to fix in the use code (subclassing the response object), but it feels like the default should follow the RFC.
Just one caveat. The ImmutableMultiDict and the ImmutableTypeConversionDict have different defaults on how they handle update to the same key. In the first case, the first value is returned, while in the second case the last value is returned.
>>> ImmutableMultiDict([['foo', 'bar'], ['foo', 'baz']]).get('foo')
'bar'

>>> ImmutableTypeConversionDict([['foo', 'bar'], ['foo', 'baz']]).get('foo')
'baz'

This might break some people's code (even if they should not have relied on the order of the cookies, according to the RFC). This could be changed easily, but make the code slightly more complex (and arcane).

I've applied some global code style cleanup and changes, and as a result this PR will no longer merge. Would you mind recreating it against the current mater? Sorry for the inconvenience.

No problem, I have rebased it!

Extended this to parse_cookie as well, as suggested in #1562.


Electron Build failing on Mac after updating to 0.31

Get this when trying to build on mac when pulling in 0.31
In file included from ../../vendor/brightray/browser/inspectable_web_contents_impl.cc:6:
../../vendor/brightray/browser/inspectable_web_contents_impl.h:147:59: error: only virtual member functions can be marked 'override'
void WebContentsFocused(content::WebContents* contents) override;
^~~~~~~~
../../vendor/brightray/browser/inspectable_web_contents_impl.cc:24:10: fatal error: 'content/public/browser/devtools_http_handler.h' file not found
#include "content/public/browser/devtools_http_handler.h"
^
2 errors generated.
ninja: build stopped: subcommand failed.

You usually need to run the bootstrap script again when pulling new code.


Saving an entry in a large dictionary hangs

We have a (test) dictionary with 37K+ entries. If you make a slight change to an entry and press Save, the "Saving" animation never disappears. If you changed the headword, the headword list on the left doesn't update like it should. If you check the network tab in developer tools, the save request fails after a few minutes with a HTTP 504 Gateway Timeout.
It seems the entry is saved correctly, because if you reload, your changes are still there, and the headword list does show the changed headword.

I can confirm this, it happens also with my collocations dictionary, 2500 entries, but many very large ones. It might be that the size of the entry is the problem.

Jan, is the dict available at lexonomy.eu? If so, can you please send a link?
Iztok, is it this one: https://www.lexonomy.eu/zwkaq8ym4/ ?

Yes, that is the one.

Mine is this one: https://www.lexonomy.eu/z5wcscn7e/
If I need to add you as a user, just let me know what e-mail address to use.

I have found out what and where the problem is, yey! It has nothing to do with the size of the dictionary or of the entries. It's XSLT-related (again).
Both these dictionaries use XSLT stylesheets. The same happens on any other dictionary that uses an XSLT stylesheet. While saving an entry, at the end of the process when the entry has already been saved, Lexonomy applies the XSLT stylesheet to the XML (in order to send a HTML-formatted visualization of the entry back to the browser). This happens on line 693 in lexonomy.js:
        ops.updateEntry(db, req.params.dictID, req.body.id, req.body.content, user.email, {}, async function (adjustedEntryID, adjustedXml, changed) {
          db.close();
          var html = "";
          if (configs.xemplate._xsl) {
            html = await fluxslt().withStylesheet(configs.xemplate._xsl).runOn(adjustedXML);

The last line, which is line 693, throws this exception:
UnhandledPromiseRejectionWarning: ReferenceError: adjustedXML is not defined

I don't know how to fix it because I don't really understand the magic with async and await. I think @mjakubicek wrote that and might be able to fix it.
P.S. Why does this only happen while saving an entry and not while reading an entry? Because reading an entry is handled by the new Python back-end which "does" XSLT differently.

you see, and i was wondering about these lines and thought, what the heck, must be the linting that is not doing its job right. but it seems the linting knows what it's doing :\
here, i think, the problem might be somewhat easier: "adjustedXml" != "adjustedXML"

Indeed, sorry for the typo.


[FEATURE] Support resizing rectangular pos_embed

Is your feature request related to a problem? Please describe.
Currently when changing ViT img size from a rectangular size, resample_abs_pos_embed() does not work correctly since it does not know the original rectangular size and assume a square.
https://github.com/huggingface/pytorch-image-models/blob/5dce71010174ad6599653da4e8ba37fd5f9fa572/timm/models/vision_transformer.py#L1096-L1103
https://github.com/huggingface/pytorch-image-models/blob/5dce71010174ad6599653da4e8ba37fd5f9fa572/timm/layers/pos_embed.py#L32-L34
Describe the solution you'd like
It should work out of the box.
Describe alternatives you've considered
Manually resize it.
Additional context
Apparently dynamic img size also will not work when original img size is rectangle.
https://github.com/huggingface/pytorch-image-models/blob/5dce71010174ad6599653da4e8ba37fd5f9fa572/timm/models/vision_transformer.py#L603-L609
This is a rare problem since most image ViT use square inputs. The particular model I'm using is my previously ported AudioMAE (https://huggingface.co/gaunernst/vit_base_patch16_1024_128.audiomae_as2m), which uses rectangular input (mel-spectrogram).
I understand it is not so straight-forward to support this, since once the model is created (with updated image size), the original image size is lost. Some hacks can probably bypass this, but not so nice

Propagate the original image size to the _load_weights() function
Create a model with the original image size, load weights as usual. Add a new method like .set_img_size() which will update the internal img_size attribute and resamle pos embed.

Perhaps an easier solution is to fix dynamic img size to pass the original img size (which I tested locally and works)
        if self.dynamic_img_size:
            B, H, W, C = x.shape
            pos_embed = resample_abs_pos_embed(
                self.pos_embed,
                (H, W),
                self.patch_embed.grid_size,
                num_prefix_tokens=0 if self.no_embed_class else self.num_prefix_tokens,
            )

@gau-nernst I have thought about this, and yeah it's not done because to do it at weight load time where it's done now, it's more complexity than I'd like, especially for the benefit/demand.
That said, I need a set_img_size() like fn for another project, so it will be supported through that mechanism. I was planning to do something similar to the swin_v2_cr implementation (https://github.com/huggingface/pytorch-image-models/blob/main/timm/models/swin_transformer_v2_cr.py#L324-L337) but tweak naming a bit...
I believe dynamic resize can be made to work, it needs the 'old size' arg to be non-default...

@gau-nernst on PR #2225 there is first pass at implementing a set_input_size fn... currently should mostly work for models from vision_transformer.py, vision_transformer_hybrid.py, and swin_transformer.py (v1)

working for mentioned models and v2 swin now too, can add to other models like eva/beit vits but will do so by request.


"Press bridge button and connect" text unclear

Suggestion/Bad design choice
I would say that the text on the connect to bridge button is not entirely user-proof. I would suggest adding a one more inbetween step where

Connect button
Alert window that tells the person to go to press the physical pairing button
Success message

Or at least some message saying what went wrong when the user presses the button without actually pressing the physical button on the device. I just thought that the extension itself is broken.
Extension version: 6

Thank you @LadislavMalecek for pointing it out. FIxed. Not pressing the button, an alert will be shown. Also, the confusing button label is changed to "Connect".


add_names fails: autonomous_regions and provinces names are missing from municipalities.json

I edited package.json file and changed config.add_names parameter from false to true
Then, after running npm install, everything worked: no errors.
An /es folder was generated, which contains 3 json files, which I tried to visualize separately into mapshaper.org:

autonomous_regions.json works: it contains border and autonomous_regions layers, and feature names are shown on hovering mouse over regions.
provinces.json works like the previous file, but contains also a provinces layer, with their names shown on hovering as well.
But municipalities.json doesn't work: it contains also a municipalities layer, with their names shown on hovering. The other two previous layers (autonomous_regions and provinces) are still present, BUT in this file they DON'T show names (I only see F.ID value on hovering each feature).

Yeah, this is a known limitation of the way we do the dissolving. We compute the polygons for provincias and comunidades directly from the municipios to share the borders. As a consequence those layers don't have names: the municipios don't have data for other administrative levels.
A better way would be to extract the feature names of every shapefile at the beginning and at the end merge them for every layer. This should be possible with mapshaper but I am not sure if I want to add it as a dependency, it's quite big compared to the topojson server.

Thanks for your answer.
So, what I should do is to edit the municipalities.json with whatever other software, and -after checking the feature "id" value against a table containing toponyms-, try to add a "properties":{"name":"feature_toponym"} to each Feature in layer provinces, and the same for the layer autonomous_regions, and then save the modified json file.
Correct?

I found a less disruptive way to do it and released 0.5.0, which fixes this. Thanks for your patience!

Thanks.
So add_names option (formerly called with_names) is not available/needed anymore in package.json configuration file, right?

No, it isn't. If you don't want names you can overwrite the files with a blank properties object like it's done here: https://github.com/martgnz/es-atlas/blob/master/properties.js#L77


ReadBufferSize option added

ReadBufferSize option added for manage header requests size per HTTP connection in server initialization.
Fixes # .
Changes proposed in this pull request:

Posibility of add ReadBufferSize configuration in server initialization

@Ignaciojeria Thank you for raising this PR!


[Bug][Agent] Agent can not import old job after reboot

What happened
Agent can not import old job after reboot
What you expected to happen
Old job should run properly
How to reproduce
reboot agent
Environment
No response
InLong version
master
InLong Component
InLong Agent
Are you willing to submit PR?

[ ] Yes, I am willing to submit a PR!

Code of Conduct

[X] I agree to follow this project's Code of Conduct

done


Replace asyncio with concurrent.futures, add tests

Resolves:

https://github.com/dan-fritchman/Hdl21/issues/122

Twinned with:

https://github.com/Vlsir/Vlsir/pull/68

Major changes:

Scrub asyncio
Deprecate sim.run_async
Add test to test multi-input simulation running in parallel
Add test to demonstrate solution to: https://github.com/erdewit/nest_asyncio/issues/57

Love it, ship it!


Tasks added in sub modules are not working properly

I have project A
gulpfile.js
require('mygulpfile-module')({})

mygulpfile-module.js
require('gulp');gulp.task("default", ["webpack-dev-server"]);

But when I run gulpfrom project A says it doesn't have any task.
In order to work I have to pass the gulp instance/module required from the project A to mygulpfile-module.js, which is not optimal.
Any way to don't have to pass the gulp module?

Are you sure? gulp-task-loader does exactly this and it works as expected.

In mine it says that there are no tasks.. What it might be?

It works for me. Try this: https://github.com/blvz/gulp-task-module-test

Ok, I understand, Now I can't test it but I will come back.

Still doesn't work...

What's your node, global gulp and OS versions?

Support questions http://stackoverflow.com/questions/tagged/gulp
Open a new issue if the problem turns out to be a bug.


Fix server status link

Description
Link to the web-console status page instead of the old dashboard
Self Check:
Strike through any lines that are not applicable (~~line~~) then check the box

[x] ~Attached issue to pull request~
[x] Changelog entry
[x] Code is clear and sufficiently documented
[x] Sufficient test cases (reproduces the bug/tests the requested feature)
[x] Correct, in line with design
[x] ~End user documentation is included or an issue is created for end-user documentation (add ref to issue here: )~

Reviewer Checklist:

[ ] Sufficient test cases (reproduces the bug/tests the requested feature)
[ ] Code is clear and sufficiently documented
[ ] Correct, in line with design

Processing this pull request

Merged into branches master, iso5 in a742c131cd7c69822c9f6fc0cba019c89fef8534