Polymorphic relationships on children aren't handled well

Not sure if this issue should live here or on the main administrate repo, but I ran into an edge case with this gem and a nested polymorphic relationship, and came up with a workaround that I thought would benefit the community by being discoverable. This was my setup:
Model Definitions
class School < ApplicationRecord
  has_many :students
  accepts_nested_attributes_for :students
end

class Student < ApplicationRecord
  belongs_to :school

  # Students can be obsessed with a school, or another student
  belongs_to :obsession, polymorphic: true, optional: true
end

Dashboard definitions
class SchoolDashboard < Administrate::BaseDashboard
  ATTRIBUTE_TYPES = {
    name: Field::String,
    students: Field::NestedHasMany
  }

  FORM_ATTRIBUTES = [
    :name,
    :students,
  ]
end

class StudentDashboard < Administrate::BaseDashboard
  ATTRIBUTE_TYPES = {
    school: Field::BelongsTo,
    name: Field::String,
    obsession: Field::Polymorphic.with_options(
      classes: [School, Student]
    )
  }

  FORM_ATTRIBUTES = [
    :school,
    :name,
    :obsession,
  ]
end

The error:
The form would load as you would expect, but on form submission, an error within ActiveRecord was thrown:
NoMethodError (undefined method `primary_key' for ActiveSupport::HashWithIndifferentAccess:Class):

activerecord (6.0.3) lib/active_record/reflection.rb:322:in `primary_key'
activerecord (6.0.3) lib/active_record/reflection.rb:468:in `association_primary_key'
activerecord (6.0.3) lib/active_record/associations/belongs_to_association.rb:104:in `primary_key'
activerecord (6.0.3) lib/active_record/associations/belongs_to_association.rb:100:in `replace_keys'
activerecord (6.0.3) lib/active_record/associations/belongs_to_polymorphic_association.rb:18:in `replace_keys'
activerecord (6.0.3) lib/active_record/associations/belongs_to_association.rb:71:in `replace'
activerecord (6.0.3) lib/active_record/associations/singular_association.rb:17:in `writer'
activerecord (6.0.3) lib/active_record/associations/builder/association.rb:108:in `obsession='
activemodel (6.0.3) lib/active_model/attribute_assignment.rb:50:in `public_send'
activemodel (6.0.3) lib/active_model/attribute_assignment.rb:50:in `_assign_attribute'
activerecord (6.0.3) lib/active_record/attribute_assignment.rb:29:in `block in assign_nested_parameter_attributes'
activerecord (6.0.3) lib/active_record/attribute_assignment.rb:29:in `each'
activerecord (6.0.3) lib/active_record/attribute_assignment.rb:29:in `assign_nested_parameter_attributes'
activerecord (6.0.3) lib/active_record/attribute_assignment.rb:23:in `_assign_attributes'
activemodel (6.0.3) lib/active_model/attribute_assignment.rb:35:in `assign_attributes'
activerecord (6.0.3) lib/active_record/nested_attributes.rb:551:in `assign_to_or_mark_for_destruction'
activerecord (6.0.3) lib/active_record/nested_attributes.rb:516:in `block in assign_nested_attributes_for_collection_association'
activerecord (6.0.3) lib/active_record/nested_attributes.rb:494:in `each'
activerecord (6.0.3) lib/active_record/nested_attributes.rb:494:in `assign_nested_attributes_for_collection_association'
activerecord (6.0.3) lib/active_record/nested_attributes.rb:372:in `students_attributes='
activemodel (6.0.3) lib/active_model/attribute_assignment.rb:50:in `public_send'
activemodel (6.0.3) lib/active_model/attribute_assignment.rb:50:in `_assign_attribute'
activerecord (6.0.3) lib/active_record/attribute_assignment.rb:29:in `block in assign_nested_parameter_attributes'
activerecord (6.0.3) lib/active_record/attribute_assignment.rb:29:in `each'
activerecord (6.0.3) lib/active_record/attribute_assignment.rb:29:in `assign_nested_parameter_attributes'
activerecord (6.0.3) lib/active_record/attribute_assignment.rb:23:in `_assign_attributes'
activemodel (6.0.3) lib/active_model/attribute_assignment.rb:35:in `assign_attributes'
activerecord (6.0.3) lib/active_record/persistence.rb:620:in `block in update'
activerecord (6.0.3) lib/active_record/transactions.rb:375:in `block in with_transaction_returning_status'
activerecord (6.0.3) lib/active_record/connection_adapters/abstract/database_statements.rb:280:in `block in transaction'
activerecord (6.0.3) lib/active_record/connection_adapters/abstract/transaction.rb:280:in `block in within_new_transaction'
activesupport (6.0.3) lib/active_support/concurrency/load_interlock_aware_monitor.rb:26:in `block (2 levels) in synchronize'
activesupport (6.0.3) lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
activesupport (6.0.3) lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `block in synchronize'
activesupport (6.0.3) lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
activesupport (6.0.3) lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'
activerecord (6.0.3) lib/active_record/connection_adapters/abstract/transaction.rb:278:in `within_new_transaction'
activerecord (6.0.3) lib/active_record/connection_adapters/abstract/database_statements.rb:280:in `transaction'
activerecord (6.0.3) lib/active_record/transactions.rb:212:in `transaction'
activerecord (6.0.3) lib/active_record/transactions.rb:366:in `with_transaction_returning_status'
activerecord (6.0.3) lib/active_record/persistence.rb:619:in `update'
administrate (0.13.0) app/controllers/administrate/application_controller.rb:60:in `update'

Why the error is thrown
I traced the root of this to the fact that the resource_params that were ultimately passed to the model instance didn't properly convert the polymorphic params nested within the has_many params.
Params were:
{"school" => {
  "name" => "Other",
  "students_attributes" => {
    "0" => {
      "school_id" => "2",
      "name" => "Le Traitor",
      "obsession" => { "type" => "Administrate::Field::Polymorphic", "value" => "gid://dummy/School/1" }
    }
  }
}

Params should have been:
{"school" => {
  "name" => "Other",
  "students_attributes" => {
    "0" => {
      "school_id" => "2",
      "name" => "Le Traitor",
      "obsession" => #<School:0x00007fcbcde14358 id: 1, name: "La Ferme du Bec Hellouin" ...>
    }
  }
}

In the Admin::ApplicationController within administrate core, there's the read_param_value(data) method which is supposed to recognize polymorphic parameters (by checking for the type key) and replace the hash with an actual resource. The default implementation only does so at the top level however, and that logic is not applied to nested parameters.
My hacky fix:
In my application, I wrote an override for the read_param_value method which recursively calls itself if it sees a set of params that does not have a type attribute:
def read_param_value(data)
  if data.is_a?(ActionController::Parameters) && !data[:type]
    data.transform_values { |v| read_param_value(v) }
  else
    super
  end
end

What a permanent fix would look like:
I imagine a PR to the main administrate repo to make the read_param_value method recursive is the "proper" fix. Although I don't know what the protocol is for making updates to the base repo specifically for the case that a separate library is used. If the base library is meant for the base use case, and this doesn't qualify, then perhaps some code in this library that overrides that default method (this approach seems like too much indirection to me personally).
I've demonstrated the bug / hack fix with some commits on this repo. You can see the comparisons / commit history here: https://github.com/nickcharlton/administrate-field-nested_has_many/compare/master...efatsi:master. And the transition from a failing spec to a passing spec thanks to the override.

Huh, interesting! Thanks for what you’ve done here, it’s very clear to understand what’s going on.
I think you’re right in that we should look at fixing this on Administrate itself, even if it feels weird to fix it for a custom field. Would you be able to open a PR over there for this?


[3.x] [Debugger] Add --debug-server CLI option.

Automatically starts the editor debug server at given <IP>:<PORT>.
E.g.:
# Run editor and debug server listening on any interface, port 8080
godot3 -e --path proj/proj_empty --debug-server *:8080

# Run the godot project connecting to that debug server.
godot3 --path proj/proj_empty --remote-debug <IP_ADDRESS>:8080

3.x bits of #52226 .

Thanks!

Hi! Didn't want to create an issue without confirming whether this is a bug or not. If I use --debug-server, I can successfully connect my game to the editor's debugger once. However, once session ends, you need to restart the Godot Editor for the debug server to open/work again.
Would making Godot keep the debug server open be a proposal or a bug report?
Here's my commands:
flatpak run org.godotengine.Godot -e --path ~/dev/games/mygame/ --debug-server *:6007

./mygame.x86_64 --remote-debug <IP_ADDRESS>:6007
# or
./mygame.x86_64 --remote-debug <IP_ADDRESS>:6007


Reintroduce checking against original php.ini values.

Seems to have been accidentally removed in 806ffb934e32644ddefc0dfb470d76218bd39334
Fixes https://github.com/silverstripe/silverstripe-installer/issues/211

I've messed this up. @tractorcow wrote a comment I accidentally deleted. The sentiment was "Please add as setter setOriginalINI($originalINI).
My thoughts where that if this was removed by mistake from a beta release then I don't mind adding it back as a parameter. I feel that's less of a semver issue compared to adding a brand new method.

The way I see it there are three options:

add a second constructor parameter for it to InstallRequirements and just construct the object with it in  install5.php
add a new setter function to InstallRequirements and call it before calling check()
make the added parameter to check() optional

I don't really care either way but I don't claim to understand the potential semver issues. However adding to an API (that isn't strictly public?) should be fine I guess?
Whatever gets the job done is fine by me. If you come to a conclusion on which solution you prefer the most let me know and I will update the branch accordingly.

I'll defer to @tractorcow

I think I should avoid bike shedding and get this appropriate fix in.


Not ideal led numbers for activation of Relay 1 and Relay 3

I did some tests and the leds you activate at the bottom (and top) for relay 1 and relay 3 are not the best choice.
at the moment it seems that you activate 7 for relay 3, when it should be 6
and 11 for relay 1 instead of 12 (which should be)
the reason i am saying this is because if you have Relay 1 or 3 ON, you are not sure if relay 2 is on since they are stuck together.
if Relay 2 is on, you are not sure if 1 or 3 is on as well.
setting the 6 and 12, it makes a better distinguish between them.
the same goes for the top leds (i can give you the led numbers if you need)

I can use the respective lights on the top.
Thanks.

I will use this picture as a reference:

Currently, when using a 3-gang device, the following LEDs are currently in use:

Button/Relay
LEDBottom
LEDTop

1
12
22

2
10
24

3
8
26

I will change to the following:

Button/Relay
LEDBottom
LEDTop

1
13
21

2
10
24

3
7
27

Done!


Having '/' in front of partition key causing migration job stuck at 0%.

Please provide us with the following information:

This issue is for a: (mark with an x)
- [x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Run a migration with a / in front of partition key with target container not exist yet(I'm running on a new cosmos db).
The job will show 0 migrated and stuck there.

Any log messages given by the failure

Expected/desired behavior

If we don't need to add / in front of partition key, it would be nice to have it show in the UI to remind users or the documentation.

OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)
Windows 10

Versions

Latest.

Mention any other details that might be useful

Thanks! We'll be in touch soon.

Noticed this issue as well and it seems quite strange as / is mandatory almost everywhere the partition key is asked.


Julia 1.1.1 ERROR: To use Mosek 9.0 with JuMP 0.19.2

I just installed Mosek 9.0 and added the Mosek.jl package to Julia 0.19.2, sucessfully.
However, I had the following error when I ran it:

And, when I tried to add MosekTools.jl, I had the following error:

Please, let me know. What can I do in order to use the Mosek.jl?

Should be resolved once https://github.com/JuliaRegistries/General/pull/2125 is merged

Should be resolved once JuliaRegistries/General#2125 is merged

I just updated it.
Thanks a lot!!


Do we support "unique" constraint and other constraints?

Overview
Unique constraint e.g. in Python when we iterating table rows - https://github.com/frictionlessdata/tableschema-py/blob/master/tableschema/table.py#L94-L104
Also to be sure we support all list of constraints:

[ ] required
[ ] unique
[ ] minLength
[ ] maxLength
[ ] minimum
[ ] maximum
[ ] enum

Great catch. The current version of tableshema-go is not supporting constraints.

Opened issues for specific implementations. It is easier to track and get contributions.


fix: remove pin on evm-trace [APE-1230]

What I did
Remove the pin on evm-trace.

@istankovic rebase and it should merge


Ability to retrieve metadata from offline runs in the Client class

Will need to be able to read from the offline directory

I don't think anyone has asked for this (can't remember), so this probably isn't urgent.


It gives hints but doesn't leap and most of the time cursor stays in same place

Hi,
I was planning to use your plugin, but for some reason it's not working.
I am using archlinux and nvim version is NVIM v0.8.3.
The configuration for leap is.
return {
  "ggandor/leap.nvim",
  keys = {
    { "s", mode = { "n", "x", "o" }, desc = "Leap forward to" },
    { "S", mode = { "n", "x", "o" }, desc = "Leap backward to" },
    { "gs", mode = { "n", "x", "o" }, desc = "Leap from windows" },
  },
  config = function(_, opts)
    local leap = require("leap")
    for k, v in pairs(opts) do
      leap.opts[k] = v
    end
    leap.add_default_mappings(true)
    vim.keymap.del({ "x", "o" }, "x")
    vim.keymap.del({ "x", "o" }, "X")
  end,
}

But it gives hints but doesn't leap and most of the time cursor stays in same place. Is there some version restrictions for this plugin?

The problem might be that you don't see the (fake) cursor (#27)? (There is a known bug, waiting to be fixed in the core (#70), that's why the actual cursor doesn't move in the first place.) If Leap doesn't leap after selecting a label, that's a curious issue. Is that the case?
Btw, is this some lazy loading magic or just key descriptions (for which-key or sg like that)?

Looks like it's from LazyVim (switch to "Full Spec" tab)


Research solutions to resolution independence

On some very low resolutions the UI will not function properly in terms of rendering. In one case, the bottom of the UI was cut off and the rendering portion would crash if the user tried to re-size vertically. We need to find a way for the UI rendering to function on all resolutions. One quick solution would be to add a scroll bar on the UI to resolutions that needed it. More research needs to be done to find the best solution

The latest version of the GUI was tested by @geovations and many of the resolution issues such as widget/text clipping were solved. The GUI has been tested to look correct in 1680x1050 and 4k resolutions. This should be tested by more users to ensure correctness.


nested json levels

as per conversation with @marianoa - nested / additional levels of payload for preview would be nice

Initial working version of this has been committed. Future improvements to come!


fix(csvExport): large data export need createObjectURL

This should fix - https://github.com/ceolter/ag-grid/issues/501
Same method as ng-csv is doing.

i merged, and it doesn't compile :(
src\ts\csvCreator.ts(36,44): error TS2339: Property 'URL' does not exist on type 'Window'.
[08:37:07]
Error: getaddrinfo ENOTFOUND
at errnoException (dns.js:37:11)
at Object.onanswer [as oncomplete] (dns.js:124:16)

fixed it.

ah, I didnt check d.ts, thank you.


Shape inference fix

A couple of fixes to enable the translation of ONNX functions using MLIR functions:
(a) The existing shape-inference pass has a hack that checks if the module contains any function with a name matching the pattern "[a-zA-Z0-9_]*main_graph" and, if so, restricts inference to those functions. Adding an option analyzeAllFunctions to skip this filter, since when translating ONNX functions into MLIR functions it is useful to apply shape-inference to all functions (even though it has a main_graph).
(b) Refine the translation process when using the option useOnnxModelTypes (which enables the translator to use type-information contained in the input model during translation) to use the resultTypeInference method if the input model doesn't contain type information.

Can one of the admins verify this patch?

Can one of the admins verify this patch?

Can one of the admins verify this patch?

Closing this PR and recreating it due to signoff/DCP issues.

Can one of the admins verify this patch?


Deploy to IBM Cloud fails

The deploy to IBM cloud  button fails:
Staging...
None of the buildpacks detected a compatible application
Exit status 222
Staging failed: STG: Exited with status 222
Stopping instance c5de5965-ba3c-40d8-a1c6-443f01c739a6
Destroying container
Successfully destroyed container

FAILED
Error restarting application: NoAppDetectedError

TIP: Buildpacks are detected when the "cf push" is executed from within the directory that contains the app source code.

Use 'cf buildpacks' to see a list of supported buildpacks.

Use 'cf logs sda-customer-churn-prediction-2-9-28 --recent' for more in depth log information.

Finished: FAILED

@scottdangelo, there may be multiple reasons for that:

You should try running this command after cd-ing into the frontend folder. This has been written in the readme

If you're inside the frontend folder, then probably the app name need to be changed in the manifest.yml, as this route will be taken since I deployed the app with that name already. I added this to the readme

I moved a piece of code in server/server.js from the global scope to the scope inside the /results route as this failed on app deployment for the first time. The issue was that the app is looking for services bound and their secrets in the environment. On first deployment no services are bound yet and this fails. I already have instructions in the readme on how to connect the needed services to the app after deploying to the cloud.

I tried all this on a fresh clone of the repo, it should be working. I'm creating a pull request with the needed changes.
Also, on a different note, I don't have access anymore to my enterprise github account, so I won't be able to view messages and comments there.

I am still getting the same error. I will look into this today.

I've fixed this in PR #19


MINOR: [CI][Python] Install pyuwsgi instead of uwsgi

The pyuwsgi distribution provides binary wheels of uwsgi, avoiding the need to compile when installing.

Rationale for this change

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

@github-actions crossbow submit -g python -g wheel

@jorisvandenbossche


I am using multibar chart , the bar loses color when data is changed, pls help

I am using multibar chart , the bar become gray if the data is updated for the bar charts .Pls help

The demo has the same issue in extended mode when you click on the refresh button.
http://krispo.github.io/angular-nvd3/#/multiBarHorizontalChart

It's fixed in the latest release. Thanks.


pip-compile unable to handle requests[security]

Can't use requests[security] in my requirements.in file
Steps to replicate
Using pip 9.0.1 & pip-tools 1.8.0
requirements.in:
requests[security]

Expected result
Not exactly sure, but something like:
#
# This file is autogenerated by pip-compile
# To update, run:
#
#    pip-compile --output-file requirements.txt requirements.in
#
cffi==1.9.1               # via cryptography
cryptography==1.6         # via pyopenssl
enum34==1.1.6             # via cryptography
idna==2.1                 # via cryptography
ipaddress==1.0.17         # via cryptography
ndg-httpsclient==0.4.2
pyasn1==0.1.9
pycparser==2.17           # via cffi
pyOpenSSL==16.2.0         # via ndg-httpsclient
requests==2.12.1
six==1.10.0               # via cryptography, pyopenssl

# The following packages are considered to be unsafe in a requirements file:
# setuptools                # via cryptography

Actual result
/tmp > ve/bin/pip-compile requirements.in
Traceback (most recent call last):
  File "ve/bin/pip-compile", line 11, in <module>
    sys.exit(cli())
  File "/tmp/ve/local/lib/python2.7/site-packages/click/core.py", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/tmp/ve/local/lib/python2.7/site-packages/click/core.py", line 696, in main
    rv = self.invoke(ctx)
  File "/tmp/ve/local/lib/python2.7/site-packages/click/core.py", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/tmp/ve/local/lib/python2.7/site-packages/click/core.py", line 534, in invoke
    return callback(*args, **kwargs)
  File "/tmp/ve/local/lib/python2.7/site-packages/piptools/scripts/compile.py", line 223, in cli
    reverse_dependencies = resolver.reverse_dependencies(results)
  File "/tmp/ve/local/lib/python2.7/site-packages/piptools/resolver.py", line 273, in reverse_dependencies
    return self.dependency_cache.reverse_dependencies(non_editable)
  File "/tmp/ve/local/lib/python2.7/site-packages/piptools/cache.py", line 139, in reverse_dependencies
    return self._reverse_dependencies(ireqs_as_cache_values)
  File "/tmp/ve/local/lib/python2.7/site-packages/piptools/cache.py", line 163, in _reverse_dependencies
    for name, version_and_extras in cache_keys
  File "/tmp/ve/local/lib/python2.7/site-packages/piptools/utils.py", line 192, in lookup_table
    for value in values:
  File "/tmp/ve/local/lib/python2.7/site-packages/piptools/cache.py", line 164, in <genexpr>
    for dep_name in self.cache[name][version_and_extras])
  File "/tmp/ve/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2986, in parse
    reqs = list(parse_requirements(s))
  File "/tmp/ve/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2930, in parse_requirements
    "version spec")
  File "/tmp/ve/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2906, in scan_list
    raise RequirementParseError(msg, line, "at", line[p:])
pkg_resources.RequirementParseError: Expected ',' or end-of-list in cryptography>=1.3.4; extra == "security" at ; extra == "security"

I think the bundle format support is generally not working, for example, broken also for celery[redis]

I can't reproduce, did I understand the issue correctly?
root@22f7b4dea128:/# pip --version
pip 9.0.1 from /usr/local/lib/python2.7/site-packages (python 2.7)
root@22f7b4dea128:/# echo "requests[security]" > requirements.in
root@22f7b4dea128:/# pip-compile requirements.in
#
# This file is autogenerated by pip-compile
# To update, run:
#
#    pip-compile --output-file requirements.txt requirements.in
#
cffi==1.9.1               # via cryptography
cryptography==1.6         # via pyopenssl, requests
enum34==1.1.6             # via cryptography
idna==2.1                 # via cryptography, requests
ipaddress==1.0.17         # via cryptography
pyasn1==0.1.9             # via cryptography
pycparser==2.17           # via cffi
pyopenssl==16.2.0         # via requests
requests[security]==2.12.3
six==1.10.0               # via cryptography, pyopenssl

# The following packages are considered to be unsafe in a requirements file:
# setuptools                # via cryptography

@RazerM yes you understood it correctly.
I've been able to reproduce this issue on both Python 2.7 and Python 3.5, macOS Sierra 10.12.1 and Ubuntu 14.04.4

@woozyking I used the docker python container. I will try to reproduce on macOS later.

See: https://github.com/nvie/pip-tools/issues/390#issuecomment-258356585

This should be fixed with newer versions of setuptools (Update setuptools to 28.7.1 and higher). Closing, feel free to reopen if still present.


Update change-email-address.md

Added a note to explain that people who donot have exchange license cannot use the domain for emails.

@nenonix @JohanFreelancer9 - kindly do the copy editor review for this PR. Thanks.

@nenonix @JohanFreelancer9 - following up on this. Please do the copy editor review for this PR. Thanks.

@pebaum - PR has been copy edited and is ready for final review. This is based on issue #809
Thank you.
cc: @kenwith


Error Handler: Introduce AXM68K bundle

Fully support AXM68K assembler (a hacked ASM68K usually bundled with macros with Z80 assembly support) and the new Sonic 1 Hivebrain's disassembly.

Add a dedicated axm68k-bundle;

Replaces set directive with = in macros to avoid name conflicts;
Renames dec to deci for the AXM68K version;

Update documentation;

TODO

[x] Test Windows makefiles;
[ ] Finish S1 Hivebrain 2022 installation guide;
[ ] Fully test AXM68K version.

Converted to draft, because this PR is way behind master now, it's easier to rebase at this point.

I initially planned to merge upon finishing documentation, but this may take another while, so I'm going to merge it as-is and, because maintaining it is getting expensive.
I'll address incomplete TODO action items once I'm done with higher priority stuff.


[5.4] Non copiable ErrorExeption

Laravel Version: 5.4.24
PHP Version: 5.6.30
Database Driver & Version: libmysql - mysqlnd 5.0.11-dev - 20120503

Description:
After the version has been updated, the output of the errors has changed, everything is beautiful and good, but the problem is that the error in the gray background can not be copied, and if you look for a problem on the Internet, you need to type each time how to disable the prohibition on copying?
Steps To Reproduce:
Allow any error in the code to throw an exception

This is related to Symfony's 3.3 release, not Laravel. When you ran composer update it also updated Symfony's Debug component to 3.3 which has these changes.
cc @javiereguiluz, @nicolas-grekas: This seems like a usability regression. I've frequently copied exception messages to search for them and it appears I'm not alone here. Was this change intentional?

@thecrypticace this was a bug. It's already fixed in https://github.com/symfony/symfony/pull/22968 and it will be part of the next Symfony 3.3.1 version. Thanks!

Nice. Looked for a PR but didn't see one. Glad to see that it has been fixed. Thanks!


Optimize file reader

This PR ports the changes from #161 onto #175.
Thanks to the couple rounds of refactors, this change is now a lot simpler to land and the optimizations related to more efficient memory management are also much simpler.
I tried to capture context in docs and comments in the code, please let me know if you have any feedback!

Why can't we call Close() when we hit EOF on the Reader?

The Reader may be reused via a call to Reset or SeekToRow, if we call Close we require re-creating the underlying Rows objects. This wouldn't be wrong, but we would miss the opportunity to more efficiently reuse the resources we already have.


Added button with tooltip and used for editting planting sites

#2691  👈
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @tommylau523 and the rest of your teammates on  Graphite

Merge activity

Jun 4, 2:38 PM EDT: @tommylau523 merged this pull request with Graphite.


re initializing after destroy callback doesn't work

What I did is first I destroyed the headroom and then initialized it. The classes are there but I can't get the callback to work.
Also, headroom was once initialized on the desktop and I am trying to destroy it in mobile and run it once again.
Have a look at the code. I have changed the code as my code has functions which won't give you a clear idea.
$( '.site-header').headroom( 'destroy' );

$( '.site-header').headroom({
	tolerance: {
		down: 15
	},
	onUnpin: function() {
		$( '.site-header').css ( 'transform', 'translateY(20px)');
	},
	onPin: function() {
		$( '.site-header').css ( 'transform', 'translateY(40px)');
	},
	onTop: function() {
		$( '.site-header').css ( 'transform', 'translateY(100px)');
	}
});

Thanks, 🥇 Great plugin

try the solution described here: https://github.com/WickyNilliams/headroom.js/issues/130

@WickyNilliams
If you look at my code I am using .headroom('destroy') which now removes the data. Which is already said on jQuery.headroom.js
if(option === 'destroy'){
  $this.removeData('headroom');
}

I apologize for the wrong title.  Headroom initializes successfully and also the class names are being added on the scroll but callback function like onPin and onTop are not working. You can try to reproduce with the given code above.

So it does, didn't even realise I'd fixed that bug 😆 I don't have time to reproduce, could you create a test case and post a link here?

Hi @WickyNilliams
Here is the test case I made on codepen https://codepen.io/sethstha/pen/rzrZOY
You can have a look there.

Found a workaround
Checking if it header has headroom class or not and destroying it saves the all the mess here.
if( $('.site-header').hasClass( 'headroom' ) ) {
   $('.side-header').headroom('destroy');
}


2125 feature gradido id: new column gradidoid in users table

🍰 Pullrequest

Issues

None

Todo

[X] new column gradidoID in users table
[X] new column alias in users table
[X] adapt entity DbUser to new columns
[X] install package uuid in database and backend modul
[X] new migration script to generate for each existing user-entry a valided unique UUID-V4
[X] add in UserResolver the generation of a valided unique UUID-V4 during createUser invokation
[X] add in UserResolverTest the additional columns and the UUID-Validation on correct version and validation

Do we have the backend version to increment?
@Tirokk We only have to increment the backend version when the .env changes. This is not the case here.


docker stops after a couple of seconds

After starting the docker, it stops after a few seconds.

Assuming you are on linux, try
setenforce permissive
Then run your command to start the bot, following with a docker ps to see if the container stays running.

Using raspberry pi OS. Cannot find any tools regarding SELInux.
On Sat, Mar 20, 2021 at 5:36 PM r0b0t2k @.***> wrote:

Assuming you are on linux, try
setenforce permissive
Then run your command to start the bot, following with a docker ps to see
if the container stays running.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/EricJMarti/inventory-hunter/issues/178#issuecomment-803478792,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AITIZVJAR2SMNNC74UMWVYDTEUWPDANCNFSM4ZQ3ZKJA
.

Using raspberry pi OS. Cannot find any tools regarding SELInux.
…
On Sat, Mar 20, 2021 at 5:36 PM r0b0t2k @.***> wrote: Assuming you are on linux, try setenforce permissive Then run your command to start the bot, following with a docker ps to see if the container stays running. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#178 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AITIZVJAR2SMNNC74UMWVYDTEUWPDANCNFSM4ZQ3ZKJA .

Oh my apologies, I am using a centos 7 VM on my server I keep at home. And with CentOS, I was getting permission issues when the container would tried to read the configs, so I set selinux to permissive and that fixed my issue. On your PI, see if there is a /var/log/messages, look at the end of the logs right after you run the container. See what you see. I am not familiar with Rasberry PI. Run your container have another terminal going and tail -f /var/log/messages and see what prints to the logs.

E2021-03-20 23:58:26,553 [root] caught exception
Traceback (most recent call last):
File "/src/run.py", line 57, in main
alerters = init_alerters(args)
File "/src/alerter/init.py", line 10, in init_alerters
return AlerterFactory.create(args)
File "/src/alerter/common.py", line 49, in create
return cls.create_from_args(args)
File "/src/alerter/common.py", line 55, in create_from_args
alerter = cls.get_alerter(args.alerter_type)
File "/src/alerter/common.py", line 70, in get_alerter
On Sat, Mar 20, 2021 at 7:29 PM r0b0t2k @.***> wrote:

Using raspberry pi OS. Cannot find any tools regarding SELInux.
… <#m_6607642262783905878_>
On Sat, Mar 20, 2021 at 5:36 PM r0b0t2k @.***> wrote: Assuming you are
on linux, try setenforce permissive Then run your command to start the bot,
following with a docker ps to see if the container stays running. — You are
receiving this because you authored the thread. Reply to this email
directly, view it on GitHub <#178 (comment)
https://github.com/EricJMarti/inventory-hunter/issues/178#issuecomment-803478792>,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AITIZVJAR2SMNNC74UMWVYDTEUWPDANCNFSM4ZQ3ZKJA
.
Oh my apologies, I am using a centos 7 VM on my server I keep at home. And
with CentOS, I was getting permission issues when the container would tried
to read the configs, so I set selinux to permissive and that fixed my
issue. On your PI, see if there is a /var/log/messages, look at the end of
the logs right after you run the container. See what you see. I am not
familiar with Rasberry PI. Run your container have another terminal going
and tail -f /var/log/messages and see what prints to the logs.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/EricJMarti/inventory-hunter/issues/178#issuecomment-803496402,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AITIZVOJDPEYQS5JXX4EJEDTEVDVZANCNFSM4ZQ3ZKJA
.

So as I stated above, I am not very familiar with Raspberry PI or its OS. Either some dependency is missing? Perhaps an updated version of python, or some other issue. But I cannot be sure. All I can say is I have had success running the bot in CentOS Linux. Unfortunately those errors only tell me something is missing, some compatibility issue, or permissions elsewhere perhaps.. Only guessing though.


Refs 4256: change snapshot interval to 24 hours

Summary
By changing it to 24 hours, we are forcing snapshotting to happen only if they haven't been snapshotted in 24 hours, not 20.  Since the job is running hourly, it won't now grab ~3 hours worth of repos
Testing steps
None right now, I think we should merge and monitor the behavior
Checklist

[ ] Tested with snapshotting feature disabled and pulp server URL not configured if appropriate

https://issues.redhat.com/browse/HMS-4256

due to the simplicity i'm gonna go ahead and merge


Expected release?

Really excited about this project. Do you have an anticipated release date? The demo looks great.

Hi @mhkeller, thank you for your interest, we expect to release the first version via npm in during September.


Auto release

automatically create release and upload assets (binary for win/osx/linux) when a new tag is created

Please assign it to me, I am not a maintainer so I cannot assign myself.

fixed by #108


TypeError: argument of type 'NoneType' is not iterable

View details in Rollbar: https://rollbar.com/Zooniverse/Zooniverse_Aggregation/items/103/
Traceback (most recent call last):
  File "./text_aggregation.py", line 603, in <module>
    project.__summarize__()
  File "./text_aggregation.py", line 508, in __summarize__
    self.__restructure_json__()
  File "./text_aggregation.py", line 297, in __restructure_json__
    if subject_id not in self.classification_alg.to_retire:
TypeError: argument of type 'NoneType' is not iterable

caused by me cntrl-c'ing a run (realized that I hadn't set things up properly for that specific run)


Add a call out for the Closed Beta

At the top of the intro page, we need a call out box that draws the readers attention that this is currently in closed beta.
This is the form that someone should fill out in order to get access to the closed beta.
https://forms.gle/XXnj1SbfmYnUq8Hu9
Also, this document talks about the release of the closed beta.
https://docs.google.com/document/d/1lVXp2TKb5gof-6hXvjWgQ7Zo09LZlorBoyjv5un8IeU/edit?usp=sharing

Fixed


[TVMScript] Relax Printer

Merging this since it helps to unblock the relax dev, i added a commit message during merge


Disable Tabbar item animation

Hi Guys,
how to disable animation when click on tab bar item ?

I'm experiencing a similar issue when changing tabs on startup (e.g. for 3D-Touch shortcuts). The selectedState() method looks promising, but I wasn't successful so far in accessing it. I'm trying to extend the controller so that it exposes a method for changing tabs without animation but it might take a while.


Allow user to add bio via bot

May be

!bio My bio is ...

This is an idea that is bigger than just a bot, I would hope this would be more universal with the bots like MEE6 bot or Nightbot...
When you join a discord server, it will find out your interests either through prompts, collect your bio from LinkedIn/Twitter/your website meta description/your og tags on a site (listed in order of what somebody is most likely to have filled in)
So when a user joins, they are prompted with a few things

bio
interests
custom questions like "What kind of Linux user are you?" - Newbie, Daily User, Power User, Compile your own kernel slob.

The interests you join EddieServer with will be different to say, an arts/crafts Discord, but it would be great if we could introduce ourselves to the server e.g.

Welcome @stemount to the server
@stemount is interested in software engineering, painting and collecting postage stamps.
they are here to ,
they are  to #Linux

however I could join the arts and crafts server and it would

Welcome @stemount to the server
@stemount is interested in Pencil Art, Stencil Art, Gothic Design.

then there would be some way to get this information again to personalise things

@stemount yeah, I think this can be a bigger feature and support more interesting ideas like you mentioned, prompting for their interests, for example. I have checked if Discord has support for user bios, but it doesn't seem like they do atm.
We could also do something simple like @eddiejaoude said "!bio My bio is ...", and this bot has some cool commands we could take inspiration from.

Great ideas 👍 . I think had many parts. I am thinking of part 1 at the moment, keeping it small. If it works well, then can be expanded further.
This will probably be split into multiple issues as we go along.

Just documenting here some updates on this issue (it seems almost forgotten 😅).
A version of this feature has been implemented on the PR #76, and the PR #86 is also related.
@eddiejaoude what do you think of adding a label named "Epic" (e.g like this repo). That way devs know this issue is split into many issues, each regarding a small part of the feature and the desired behavior. Just wanted to shoot some ideas on how to organize better these related issues, and help newcomers navigate through the changes and story of a feature.
If someone doesn't know what "Epic" is, here is a reference for you to read more 😃

Good idea @BOLT04 , however, if possible, I would prefer, to create the new issues immediately from the discussion, so they can all be independent (prioritise / worked on etc).
Do you think that is possible? I can create new issues from the comments above, or other people are welcome to create them

Yes, I think it's great to create new issues immediately from the discussion 👍 . My comment was more of a way to add a reference to the PRs that are related to this issue. I felt that if a new person saw this issue they might see it hasn't been updated in a while and it wasn't been worked on. I just wanted to inform readers with some updates 😃
On second thought, I'm not sure adding that label would be that helpful. I think what you said of independent pieces of work is the way to go.

I think the original part of this ticket is done, but we should create new tickets from the discussions, then closer this ticket to avoid confusion. In the newly created tickets they could reference this tickets so the history and journey of thinking is easily found if required.

Closing this as bio is done, but I created #95 for more features


Use correct link type

The send email view doesn't work correctly if opened in the sideframe.

Pull Request Test Coverage Report for Build 181

0 of 0   changed or added relevant lines in 0 files are covered.
3 unchanged lines in 1 file lost coverage.
Overall coverage decreased (-0.1%) to 99.309%

Files with Coverage Reduction
New Missed Lines
%

devday/utils/devday_toolbar.py
3
91.11%

Totals

Change from base Build 180:
-0.1%

Covered Lines:
2459

Relevant Lines:
2473

💛  - Coveralls


enable uploading to pypi at each release

Pull Request Test Coverage Report for Build<PHONE_NUMBER>5
Details

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

Totals

Change from base Build<PHONE_NUMBER>9:
0.0%

Covered Lines:
96

Relevant Lines:
102

💛  - Coveralls


No doublequotes around attribute name in NixOS module errors

Issue description
(moved from https://github.com/NixOS/nix/issues/1065)
I've got this error when trying to configure nginx module.
building all machine configurations...
error: The option `services.nginx.virtualHosts.content.defenders.com./' defined in `/home/deployer/testing/fleet/test.nix' does not exist.
(use ‘--show-trace’ to show detailed location information)

I think, this warning should include double-quotes around content.defenders.com and /
Steps to reproduce
Make some errorneous nginx config
    services.nginx.enable = true;
    services.nginx.virtualHosts."content.defenders.com"."/" = "/";

Technical details

Nixpkgs and nixos version: https://github.com/NixOS/nixpkgs/archive/c47eb4a43a9ab338c26b6b05d59ad0cb90507ed1.tar.gz

iirc the quoting issue was fixed.


Merge relase into main

Description
Merge relase into main
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

/bot run checks


Support string opcodes in JSON Patch compact encoding

Closes https://github.com/streamich/json-joy/issues/92

:tada: This PR is included in version 6.2.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


=> ERROR [internal] load metadata for docker.io/bcgovimages/von-image:py36-1.15-1

when i try Start Agent by used The following command :
PORTS="8080:8080 8000:8000"
scripts/run_docker start --wallet-type indy
--seed<PHONE_NUMBER>00000000000000000Agent
--wallet-key welldone
--wallet-name myWallet
--genesis-url http://von_ip_address/genesis
--inbound-transport http <IP_ADDRESS> 8000
--outbound-transport http
--admin <IP_ADDRESS> 8080
--admin-insecure-mode
will return an error
[+] Building 3.4s (16/16) FINISHED
=> [internal] load build definition from Dockerfile.run                   0.1s
=> => transferring dockerfile: 651B                                       0.0s
=> [internal] load .dockerignore                                          0.1s
=> => transferring context: 138B                                          0.0s
=> [internal] load metadata for docker.io/bcgovimages/von-image:py36-1.1  2.4s
=> [ 1/11] FROM docker.io/bcgovimages/von-image:py36-1.15-1@sha256:7ba94  0.0s
=> [internal] load build context                                          0.8s
=> => transferring context: 7.78MB                                        0.8s
=> CACHED [ 2/11] ADD requirements*.txt ./                                0.0s
=> CACHED [ 3/11] RUN pip3 install --no-cache-dir     -r requirements.tx  0.0s
=> CACHED [ 4/11] RUN mkdir aries_cloudagent && touch aries_cloudagent/_  0.0s
=> CACHED [ 5/11] ADD aries_cloudagent/version.py aries_cloudagent/versi  0.0s
=> CACHED [ 6/11] ADD bin ./bin                                           0.0s
=> CACHED [ 7/11] ADD README.md ./                                        0.0s
=> CACHED [ 8/11] ADD setup.py ./                                         0.0s
=> CACHED [ 9/11] RUN pip3 install --no-cache-dir -e .                    0.0s
=> CACHED [10/11] RUN mkdir logs && chown -R indy:indy logs && chmod -R   0.0s
=> CACHED [11/11] ADD aries_cloudagent ./aries_cloudagent                 0.0s
=> exporting to image                                                     0.0s
=> => exporting layers                                                    0.0s
=> => writing image sha256:a5c8cf8066cac0ad71f2023333ec8b35d2c4dbba65e36  0.0s
=> => naming to docker.io/library/aries-cloudagent-run                    0.0s
Container name: aries-cloudagent-runner_mqry6cAJDE3WvsGJ
No Docker network specified.
please give me some help

Sorry for the lack of response. Likely a local issue, but not sure what. Closing as this works for the vast majority.


:bug: command can now accept Optional[T] as a type

Changes

adds: ...
fixed: #302
improvements: ...

Check off the following

[x] I have tested my changes with the current requirements
[x] My Code follows the pep8 code style.

Test code
from os import getenv
from time import perf_counter
from typing import Annotated, Optional

from dotenv import load_dotenv

from pincer import Client
from pincer.commands import Description, command
from pincer.objects import MessageContext

marker = perf_counter()
load_dotenv("./dev/.env")

class Bot(Client):
    @Client.event
    async def on_ready(self):
        print(
            f"Logged in as {client.bot} after {perf_counter() - marker} seconds"
        )

    @command(guild=802586580766162964)
    async def cmd(
        self,
        ctx: MessageContext,
        content: Annotated[Optional[str], Description["..."]] = None,
    ) -> str:
        return f"{ctx.author.mention} h: {content}"

token = getenv("TOKEN")
assert token is not None
client = Bot(token)
client.run()

there is no commands dir so i cant really do much about coverage

@Endercheif Done

I think


[BUG] You can see VMs in harvester-system namespace in Rancher virtual machine management

Describe the bug

You can see VMs that are in the harvester-system namespace in the virtual machine list from an upstream Rancher cluster.
To Reproduce
Steps to reproduce the behavior:

Create a VM on Harvester in the harvester-system namespace
Import Harvester into Rancher
Navigate to VM list from virtual machine management with admin Rancher user
Expected behavior

Support bundle

support bundle still showing upgrade thing.zip
Environment

Harvester ISO version: v1.1.2-rc1
Rancher version: single node Docker v2.7.1
Underlying Infrastructure (e.g. Baremetal with Dell PowerEdge R630): Single node Harvester libvirt VM

Additional context
Add any other context about the problem here.
This seems to be an issue with filtering the namespaces. We don't see this in the Harvester dashboard, but we do in the Rancher integrated dashboard. I saw this when a VM was left in terminating after an upgrade with #3529 . In the screenshots the darkmode is Harvester dashboard, and the light mode is Harvester through Rancher virtual machine management. I'm going to see if I can get this to repro with less steps.

Hi @noahgildersleeve  namespace filtering is a known issue in rancher 2.7.1 and has been fixed in rancher 2.7.2-head,
Normally, users cannot create VMS in the harvester-system namespace.  The vm you see upgrade-repo-hvst-upgrade-p9w6j in harvester-system is created when the backend is upgraded.

This looks to be good :smile:  - tested on v2.7.2-rc5 w/ v1.1.2-rc3
I'll go ahead and close this out


lib.getExistingAttrs: init

Description of changes
This PR introduces lib.getExistingAttrs, a handy function that returns a sub- attribute according to the input list of attribute names. Unlike lib.getAttrs, it skips attributes that doesn't exists instead of throwing the error of missing attributes. It acts as the complement of removeAttrs.
Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[X] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
23.11 Release Notes (or backporting 23.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[X] Fits CONTRIBUTING.md.

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

What are the use cases?
And in any case, needs tests

What are the use cases?

It's used inside the definition of lib.extendDerivation' introduced in #269785. I defined it locally there to avoid unnecessary coupling between PRs.
I also find it useful when trying to implement the support for multiple VSCode extension registries (#121583).

And in any case, needs tests

Where could I add a test case for Nixpkgs lib functions?

Where could I add a test case for Nixpkgs lib functions?

https://github.com/NixOS/nixpkgs/blob/master/lib/tests/misc.nix

And in any case, needs tests

Tests added.

The ofborg bot seems broken.

This is a generalized intersectAttrs, so I would prefer to call it by that name.
See https://github.com/NixOS/nix/issues/9050

In particular intersectAttrs feels like it should be a symmetric operation, something like (a -> a -> a) -> Attrs -> Attrs -> Attrs, where the (a -> a -> a) is called when there's a shared attribute.

I agree that the word intersect should imply something symmetric. lib.intersectLists does prefer the second one over the first one by inherits its order of elements, but it is at least the mathematical set intersection of the elements from both lists.

Here's some alternate ideas:
* getAttrNames
* selectAttrs
* selectAttrNames
* filterAttrsByNames
* limitAttrs
* getExistingAttrs (current PR)
* intersectAttrs (@roberth's proposal)

Regarding these candidates, I like selectAttrs and getExistingAttrs better.

limitAttrs doesn't contain the information about how the limitation is applied.
selectAttrNames sounds like the output would be a list of names like builtins.attrNames
filterAttrsByNames seems good at the first sight, but it could also be interpreted as a simpler version of filterAttrs that takes (name: decision) instead of (n: v: decision).

Please check out https://github.com/NixOS/nix/issues/9050#issuecomment-1981505272, where I proposed this:

lib.attrsets.removeKeys :: List -> Attrs -> Attrs
lib.attrsets.selectKeys :: List -> Attrs -> Attrs

Would be very consistent and not conflict with any builtins names.

I'll revert back to getExistingAttrs :: [ String ] -> AttrSet -> AttrSet then.
We could extend it later if we like to.

Bump!

How about getOptionalAttrs?
It's close to both getAttrs and optionalAttrs, both of which are relevant, and quite consistent.
It also avoids exists, which hasn't been used in a context like this in the library, and reminds me of first-order logic, which is not relevant here.

Re https://github.com/NixOS/nixpkgs/pull/269586#issuecomment-1826768072:

I also find it useful when trying to implement the support for multiple VSCode extension registries (#121583).

https://github.com/NixOS/nixpkgs/blob/5817f71d00b2a90f8924224f167e1867f768bca8/pkgs/applications/editors/vscode/extension-registries/commons/modifiers/cookrefs.nix#L37
There you can just do this instead:
{ inherit (ref) description homepage"; }

It's used inside the definition of lib.extendDerivation' introduced in #269785

https://github.com/NixOS/nixpkgs/blob/87c9a091537a4473d2dd115066ac8c304aece202/lib/customisation.nix#L457-L458
That's a better use case.

I guess the problem is really that we have two ways to represent a set of strings. On one hand there's List String ([ "a" "b" "c" ]), which has the problem that it doesn't allow efficient operations.
On the other hand there's Map String Any ({ a = null; b = null; c = null; }) which has the problem that it has unnecessary values, so it's annoying to construct.
Here's an idea for an alternative: Let's have a function that allows easily constructing an attribute set from a list of strings:
nullAttrs = attrs: genAttrs attrs (_: null)

This way
getExistingAttrs names attrs
==
intersectAttrs (nullAttrs names) attrs

This also makes it clear that if you have multiple such calls, the nullAttrs call can be shared between them, whereas with getExistingAttrs it can't.

Re #269586 (comment):

I also find it useful when trying to implement the support for multiple VSCode extension registries (#121583).

https://github.com/NixOS/nixpkgs/blob/5817f71d00b2a90f8924224f167e1867f768bca8/pkgs/applications/editors/vscode/extension-registries/commons/modifiers/cookrefs.nix#L37
There you can just do this instead:
{ inherit (ref) description homepage"; }

You're right. I cannot recall why I did it that way back then.

It's used inside the definition of lib.extendDerivation' introduced in #269785

https://github.com/NixOS/nixpkgs/blob/87c9a091537a4473d2dd115066ac8c304aece202/lib/customisation.nix#L457-L458
That's a better use case.

Thank you.

I guess the problem is really that we have two ways to represent a set of strings. On one hand there's List String ([ "a" "b" "c" ]), which has the problem that it doesn't allow efficient operations.
On the other hand there's Map String Any ({ a = null; b = null; c = null; }) which has the problem that it has unnecessary values, so it's annoying to construct.
Here's an idea for an alternative: Let's have a function that allows easily constructing an attribute set from a list of strings:
nullAttrs = attrs: genAttrs attrs (_: null)

This way
getExistingAttrs names attrs
==
intersectAttrs (nullAttrs names) attrs

This also makes it clear that if you have multiple such calls, the nullAttrs call can be shared between them, whereas with getExistingAttrs it can't.

I'm haven't dug into the C++ implementation of Nix Language lists and attribute sets yet. So the point is, lib.intersectLists is slow (operating two linked lists with $O(n \log n)$ or even $O(n^2)$ time complexity), and builtins.intersectAttrs is so fast that constructing an attribute set of nulls is worth it. Is that right?
If the recommended way to implement is,
names: intersectAttrs (nullAttrs name)

it would be better to interpolate builtins.intersectAttrs into lib as lib.attrsets.intersectAttrs.

it would be better to interpolate builtins.intersectAttrs into lib as lib.attrsets.intersectAttrs.

I'm all for that, I think all lib-like builtins should be exposed like that!

Actually, nullAttrs seems quite expensive, allocating another list and n nameValuePair attrsets. I think I wrongly assumed genAttrs was a builtin.
Unfortunately, the builtins don't offer many ways to go from lists to attrsets.
Here's another possible implementation that uses single-attribute attrsets instead of nameValuePairs, but also n singleton lists. Those are represented quite efficiently, so although this is an odd solution, it might be competitive.
  getExistingAttrs = l: p:
    lib.zipAttrsWith
      (name: values: head values)
      (map
        (n: if p?${n} then { ${n} = p.${n}; } else { })
        l);

If we really want performance, we should probably do https://github.com/NixOS/nix/issues/9050 or make genAttrs into a builtin.
That function is hardly used within the library (or the module system therefore), so I'm not sure that we get a real-world gain from that; not until a use case like this becomes more prevalent in actual hot code.

Actually, nullAttrs seems quite expensive, allocating another list and n nameValuePair attrsets. I think I wrongly assumed genAttrs was a builtin.

We can optimise that later if necessary. In turn, an interface like getOptionalAttrs <list> <attrs> can fundamentally not be optimised further.
I'm really not convinced by the overall motivation for this function and would like to see nullAttrs instead as a dedicated way to turn a list into an attribute set.


Any example for SSR using css-modules-require-hook?

Hi there,
I've been trying to get react-toolbox to work with universal-webpack, to do SSR.
I added the following css-modules-require-hook hook prior to the server code, as explained (more or less) in the documentation:
// Render CSS modules during server-side rendering
const hook = require('css-modules-require-hook');
hook({
  extensions:         ['.css'],
  generateScopedName: '[name]__[local]___[hash:base64:5]',

  use: [
    // adding CSS Next plugin
    require('cssnext')(),
  ]
});

When I run it, I get the following output:
Container#eachAtRule is deprecated. Use Container#walkAtRules instead.
Container#eachDecl is deprecated. Use Container#walkDecls instead.
Container#eachRule is deprecated. Use Container#walkRules instead.
Node#removeSelf is deprecated. Use Node#remove.
Your current PostCSS version is 5.2.14, but postcss-pseudo-class-any-link uses 4.1.16. Perhaps this is the source of the error below.

Error: Expected pseudo-class or pseudo-element
    at new error (project_root/node_modules/postcss-selector-parser/dist/processor.js:27:23)
    at Parser.error (project_root/node_modules/postcss-selector-parser/dist/parser.js:212:15)
    at Parser.parse (project_root/node_modules/postcss-selector-parser/dist/parser.js:502:22)
    at Parser.loop (project_root/node_modules/postcss-selector-parser/dist/parser.js:470:18)
    at Processor.process (project_root/node_modules/postcss-selector-parser/dist/processor.js:24:21)
    at eachRule (project_root/node_modules/postcss-pseudo-class-any-link/index.js:29:6)
    at project_root/node_modules/css-modules-require-hook/node_modules/postcss/lib/container.es6:110:26
    at Rule.each (project_root/node_modules/css-modules-require-hook/node_modules/postcss/lib/container.es6:78:22)
    at project_root/node_modules/css-modules-require-hook/node_modules/postcss/lib/container.es6:112:32
    at Root.each (project_root/node_modules/css-modules-require-hook/node_modules/postcss/lib/container.es6:78:22)
    at project_root/node_modules/postcss-pseudo-class-any-link/index.js:33:7
    at LazyResult.run (project_root/node_modules/css-modules-require-hook/node_modules/postcss/lib/lazy-result.es6:321:20)
    at LazyResult.sync (project_root/node_modules/css-modules-require-hook/node_modules/postcss/lib/lazy-result.es6:307:32)
    at LazyResult.warnings (project_root/node_modules/css-modules-require-hook/node_modules/postcss/lib/lazy-result.es6:157:21)
    at fetch (project_root/node_modules/css-modules-require-hook/lib/index.js:98:16)
    at Object.cssModulesHook [as .css] (project_root/node_modules/css-modules-require-hook/lib/attachHook.js:15:20)

I also tried version 4.1.16.
I tried adding require('postcss-import')(), require('postcss-mixins')(), require('postcss-each')() but apparently they are asynchronous plugins and don't work:
Error: Use process(css).then(cb) to work with async plugins
    at LazyResult.sync (project_root/node_modules/css-modules-require-hook/node_modules/postcss/lib/lazy-result.es6:309:23)
    at LazyResult.warnings (project_root/node_modules/css-modules-require-hook/node_modules/postcss/lib/lazy-result.es6:157:21)
    at fetch (project_root/node_modules/css-modules-require-hook/lib/index.js:98:16)
    at Object.cssModulesHook [as .css] (project_root/node_modules/css-modules-require-hook/lib/attachHook.js:15:20)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (project_root/node_modules/react-toolbox/lib/ripple/index.js:13:14)
    at Module._compile (module.js:571:32)
    at Module._extensions..js (module.js:580:10)
    at Object.require.extensions.(anonymous function) [as .js] (project_root/node_modules/babel-register/lib/node.js:152:7)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)
    at Function.Module._load (module.js:439:3)
    at require (internal/module.js:20:19)

I know there's a standard example and I've tried to follow it to a tee, but I just can't get it to work with SSR. I could not find even one working example.
Can anyone assist?

Anyone working on this?

I gave up on react-toolbox and moved to Material UI instead.
SSR works out of the box, no need to do theming via Webpack, and supposedly v2 will solve the main performance issues that comes from their method of implementing CSS.

Sorry to hear @advance512. I've been out for some time and couldn't answer issues. You can perfectly use SSR like with any other app if you jump into react-toolbox-themr. No need for CSS Modules require hook or anything, pretty straightforward.
Forget about 1.x for now. It's going to be deprecated and, in fact, I'm working on a totally different approach using styled-components that allows you to skip any setup. 2.0 is perfectly safe to use and you shouldn't run into issues following the Readme in react-toolbox-themr repository. If there is an issue with it, please report it in a different issue.
Still if you need help, let me now!

styled-components is indeed the way to go. I'll revisit react-toolbox when v2 comes out.

styled-components will be a better choice for react-toolbox core styling.
Hope future version will consider to use it.

I too struggled in configuring a universal app with Webpack 2, React Toolbox, React Router, etc. Eventually, I was able to come up with a working example. Hope it helps others who encounter the same struggle and may arrive here from an exhaustive Google search. I forked and created a React Toolbox feature branch from richardkall/react-starter to demonstrate a simple universal app. It does rely on css-modules-require-hook.
Here's the example.

I'm working on a totally different approach using styled-components that allows you to skip any setup.

Sad day. ;( I was really excited about this project because it forgoes CSS-in-JS approaches and prefers pure css and css-modules.z

Sorry @danny-andrews :( I think the most challenging aspect of this project is customizing components. It would be way easier and flexible with CSS-in-JS as some POC are proving. Most people find it difficult to override selectors and to work with those theme objects. With the future version it will be still possible to write a CSS Modules version but we can't have everything

@javivelasco I understand. :) css-modules has some work to do as far as DevX is concerned.
As long as consumers of this library will still be able to customize it via CSS-modules, Ima happy.

Also, worth noting that styled-components doesn't allow you to extract CSS into a separate file, so all CSS defined in this library will be injected at runtime and unable to be cached.
Aphrodite and emotion support CSS extraction out of the box. Just something to keep in mind!
Thanks for your work on this library. Cheers!

Yeah agree @danny-andrews but it has its drawbacks. It is true that you're not caching CSS but you do it with JS while you only download the needed code if you implement code splitting. Extracting all css would make you to download one big CSS file with rules that are not really needed for the page and I think building kind of code splitting with CSS may be overkill.
There always will be drawbacks but I can tell you that with styled-components we can get an amazing customization API to build apps really really fast and anyway a migration to CSS would be very easy!


ArchLinux PKGBUILD for ponyup

I've attempted to create an ArchLinux PKGBUILD for ponyup. It is working, installs "ponyup", sets up PATH, and ponyup is ready for use. But I'd like to receive feedback on it.
The goal was to be able to install ponyup by just doing pacman -S ponyup. And having a cleaner system because on uninstalling pacman automatically removes all the installed package files.
Repository:
https://github.com/superherointj/arch-pkgbuild-ponyup
Problems/Questions:
1 - Is distribution packaging of "ponyup" (for Arch Linux) welcomed? Is there a philosophical problem between installing 'ponyup' using a script or pacman?
2 - Can I refer to "ponyup" as PonyUp?
3 - I had trouble using "make" (lack of cc error, or linker) so I used pony compiler directly. With -pic directive. It has worked for me. But Is it fine? Can I keep this way?

stable fetch && stable env ponyc --pic -Dopenssl_1.1.x -o ./build/ -b ponyup cmd

4 - I had to workaround cmd/version.pony need, so I manually did:

printf 'primitive Version\n  fun apply() : String =>\n    "%s"' "$pkgver" > cmd/version.pony

5 - Any other consideration?
This package probable can improved further and I'd appreciate if you have any feedback on it.
Thanks.

Is distribution packaging of "ponyup" (for Arch Linux) welcomed?

YES! This is awesome.

Is there a philosophical problem between installing 'ponyup' using a script or pacman?

Not sure what you mean, if you would like to maintain a way to do it with pacman, then have at it!

Can I refer to "ponyup" as PonyUp?

well, the name of the command is ponyup and we refer to it as such. @Theodus I think we want to keep it as ponyup. Do you have an opinion?

I had trouble using "make" (lack of cc error, or linker) so I used pony compiler directly. With -pic directive. It has worked for me. But Is it fine? Can I keep this way?

It's on you to maintain it. However, I think this is a bad idea and you should using make. It will make maintenance much much easier.
Here's something to consider. Nightly and release builds are created and stored in cloudsmith, you might be able to use those.
I don't know anything about pacman, so, you are the expert. As long as everything works, then that is what is important. I think you should aim to use the supplied build system as it will save you a lot of pain down the road, but... again, it's your project and you are maintaining it.

Can I refer to "ponyup" as PonyUp?

I think it should remain "ponyup".

Glad to know packaging ponyup for ArchLinux is welcomed.
The AUR team advised me to build ponyup from sources instead of downloading binaries.
ArchLinux AUR requires compiling from sources and does not allow downloading or running a script that downloads and runs remote files for security reasons. PKGBUILD has to follow the ArchLinux AUR philosophy. In this case, ponyup-init.sh is unfit. The PKGBUILD will do the same function ponyup-init.sh does, and will replace it.
I did not mean to suggest any change to application name. Just wanted to confirm how the application should be written. "ponyup" is the name, everything in lower case, no uppercase.
I acknowledge the value of using same build system. I will make another attempt to use
the Makefile. And I'll report back my findings, so please, for now, leave this issue
open. I'm still working on this.
Pacman is a really nice package manager. One day give it/Arch a try. You might find yourself loving it. :)

@superherointj shall we keep this issue open or is it good to close now?

ponyup is available at ArchLinux's AUR.
https://aur.archlinux.org/packages/ponyup/
Arch users can:
yay -S ponyup
And eventually, hopefully (not available yet): pacman -S ponyup
Used make as suggested, removed the version crap thing, seems better:
https://github.com/superherointj/arch-pkgbuild-ponyup/blob/master/PKGBUILD
Great day!


running with suggested config file doesn't work

Hi!  Not sure this is a config problem or not (although running GPyOpt in python appears to work so far.  Directly running the example from the tutorial here (http://sheffieldml.github.io/GPyOpt/firstexamples/index.html) gives me an error:
$ gpyopt.py config_ex.json
Traceback (most recent call last):
  File "/home/unix/cgdeboer/.conda/envs/GPyOptEnv/bin/gpyopt.py", line 20, in <module>
    bo = driver.run()
  File "/home/unix/cgdeboer/.conda/envs/GPyOptEnv/lib/python2.7/site-packages/GPyOpt/interface/driver.py", line 105, in run
    space = self._get_space()
  File "/home/unix/cgdeboer/.conda/envs/GPyOptEnv/lib/python2.7/site-packages/GPyOpt/interface/driver.py", line 38, in _get_space
    assert 'space' in self.config, 'The search space is NOT configured!'
AssertionError: The search space is NOT configured!

I also note that I can't find much in the way of documentation regarding the syntax of these config files.
Finally, the link at the bottom of this page (http://sheffieldml.github.io/GPyOpt/tutorial/index.html)
Check the GPyOpt documentation for details of the different functionalities.
is broken.

Same problem here, and unable to find json file specs. I think the documentation may have moved here (per https://github.com/SheffieldML/GPyOpt/issues/164), but I can't find anything about the config file there.

I meet the same problem, the code tutorial seems provide us with a wrong example.
I finally remove the bugs by changing the "variables" part of the json file to the code below：
    "space" : {         "x": { "name": "var_1",             "type" : "continuous",             "dimensionality" : 1,             "domain"  : "(-1,1)"         },         "y": {"name": "var_2",             "type" : "continuous",             "dimensionality" : 1,             "domain"  : "(-2,2)"         }     },
meanwhile，add the below code into line93 of  GPyOpt.core.task.space.py
        space = [space['x'], space['y']]
But it seems like I will always need to change the space.py when changing variables.


Swift 3.2/4 Support

Manually setting Mixpanel-Swift to version 3.2 until a stable Swift 4 release

Because we cannot target Mixpanel's Swift4 branch, our approach will be to set swift-version to 3.2 and will include additional instructions on supporting Mixpanel's Swift3.2 release in a Swift4 codebase


Print out log statements while test executes

I added log statements to my (long running) tests so that I could get a sense of the test status, but log statements aren't printed out until after the full test case has run.
Request: print log statements immediately, as they are run.

@googleapis/samplegen


FirebaseLogin - Dialog Dismiss throws NPE

Stacktrace:
java.lang.NullPointerException: Attempt to invoke virtual method 'android.app.FragmentTransaction android.app.FragmentManager.beginTransaction()' on a null object reference

the new revision has different new issues, this bug is obsolete


eCAL 6 Ideas

This is an ugly list of Ideas for eCAL 6. So Ideas, that we would like to have, but that may not be feasible with eCAL 5.
This list was taken over from another issue tracker.

Make eCAL RAII (-> have an eCAL Object)

Singleton interface can be added after the fact by having a global eCAL Object
Should improve testing in a single Process, as multiple eCAL Nodes can be spawned

Support Shared-memory across different hosts (-> for Docker!)
Make publishers offer different layers (e.g. UDP and TCP) and let the subscriber decide. Currently the publisher must decide which layer must be used
Introduce a kind of domain concept to allow running multiple isolated ecal setups on the same host

eCAL can't get any traction where I work because of the DNS requirement.
I'd like to propose we somehow work around the DNS requirement? Some possibilities:

Allow the user to specify a node name and ecal can keep track of the node name to ip mapping during the initial multicast handshake
Fake it out. Use the IP address as a fake hostname. If eCAL sees a hostname of <IP_ADDRESS>, it knows to use that IP address instead of doing a DNS lookup.
Do away with DNS all together and simply use IP addresses for everything.

Forcing either 1) running a DNS server or 2) managing hosts file across all nodes to use eCAL is really painful on embedded systems.
With that said - I'm sure there are 100 things that make this not so easy.
Thanks!

@rhd: Thanks for that feedback! DNS is only needed for TCP based communication, which is the Client-Server Service Protocol as well as the TCP Publish Subscribe Protocol. For the normal eCAL Communication (Pub-Sub via Shared Memory and UDP) you don't need any DNS. I guess you would need the Client-Server Protocol to work without Hostname Resolution?
I would be very interested in your use-case, as well as the libraries that you are using instead (only if you are allowed to share those kind of information, of course)

Forcing either 1) running a DNS server or 2) managing hosts file across all nodes to use eCAL is really painful on embedded systems.

I totally agree with that

Hi @FlorianReimold - thanks for the clarification! I actually thought DNS was needed for everything (except local). Good to know it's not true.
Just to make sure I understand, if you have two nodes with the same hostname but different IPs, eCAL pub/sub will still work across the network?
If we remove eCAL from the equation, it's safe to say that DNS is not a requirement for TCP to work. I'd love to see the same capability passed onto eCAL TCP comms :)
Anyway, thanks again - eCAL seems like a great product and I'm happy to see the continued development and discussion about the future.

if you have two nodes with the same hostname but different IPs, eCAL pub/sub will still work across the network?

Yes, that is the case. eCAL will use UDP Multicast in that case and not address any other host directly, so no IP address of the other host is needed. You only need to make sure that the multicast packages reach the correct network interface by setting a route, but when you only have 1 interface, you may even be able to skip that step.
You can check the guide in our documentation on how to do that on Windows and Linux:
https://eclipse-ecal.github.io/ecal/getting_started/cloud.html

If we remove eCAL from the equation, it's safe to say that DNS is not a requirement for TCP to work. I'd love to see the same capability passed onto eCAL TCP comms :)

That is correct. The reason why we do need DNS for TCP is that TCP creates 1:1 connections and doesn't have a multicast protocol. Therefore, you always need an address of the other host, which can either be the IP address or a hostname which has to be resolved to an IP via DNS.
We assume that each host has 1 (and only 1!) hostname, so this is perfect for "addressing" a host via UDP Multicast, where we actually don't need a proper address. If we would have used an IP address, we would have stood in front of the problem that each host can have many IP addresses and there isn't really a way to automatically choose the correct one.
The same goes for the TCP Layer. If eCAL shall address the other host via IP address directly (so we don't need DNS), we will probably have to rely on some user configuration. It is absolutely doable, but we just chose to leave the user configuration in /etc/hosts and rely on hostname resolution through that.

Anyway, thanks again - eCAL seems like a great product and I'm happy to see the continued development and discussion about the future.

Thank you 😊


roleIDs == false

Im getting an error that is saying my steamname has not gotten their permissions cause roleIDs == false? What does that mean? Thanks.

This is an issue on your end you need to fix


Same issue today as last week

Hey I used API since few months, but it doesn't work anymore for 5 days.
I don't know why. It also bug on your website.
Originally posted by @PlXBCR in https://github.com/nadermx/backgroundremover/issues/154

This has finally been fixed.


argo watch fails with an "EOF" error for workflows lasting > 90 seconds

Checklist:

[x] I've included the version.
[x] I've included reproduction steps.
[x] I've included the workflow YAML.
[x] I've included the logs.

What happened:
In Argo v2.7.5, for any long / involved workflows, both argo submit --watch and argo watch fail after about 80-90 seconds, with the following error:
FATA[0117] EOF
(the number in brackets varies)
How to reproduce it (as minimally and precisely as possible):
Just run any script that lasts at least 80-90 seconds, and watch it. Here's a simple example:
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: long-workflow-
spec:
  entrypoint: plan
  templates:
  - name: plan
    container:
      image: alpine:latest
      command: [sh, -c, sleep 90]

When I run argo submit --watch on this, I get this:
Name:                long-workflow-66s8q
Namespace:           virtual
ServiceAccount:      default
Status:              Pending
Created:             Thu Apr 23 20:35:50 +0800 (now)
Name:                long-workflow-66s8q
Namespace:           virtual
ServiceAccount:      default
Status:              Running
Created:             Thu Apr 23 20:35:50 +0800 (now)
Started:             Thu Apr 23 20:35:50 +0800 (now)
Duration:            0 seconds

STEP                    TEMPLATE  PODNAME              DURATION  MESSAGE
 ◷ long-workflow-66s8q  plan      long-workflow-66s8q  0s
Name:                long-workflow-66s8q
Namespace:           virtual
ServiceAccount:      default
Status:              Running
Created:             Thu Apr 23 20:35:50 +0800 (1 second ago)
Started:             Thu Apr 23 20:35:50 +0800 (1 second ago)
Duration:            1 second

STEP                    TEMPLATE  PODNAME              DURATION  MESSAGE
 ◷ long-workflow-66s8q  plan      long-workflow-66s8q  1s        ContainerCreating
Name:                long-workflow-66s8q
Namespace:           virtual
ServiceAccount:      default
Status:              Running
Created:             Thu Apr 23 20:35:50 +0800 (3 seconds ago)
Started:             Thu Apr 23 20:35:50 +0800 (3 seconds ago)
Duration:            3 seconds

STEP                    TEMPLATE  PODNAME              DURATION  MESSAGE
 ● long-workflow-66s8q  plan      long-workflow-66s8q  3s
FATA[0067] EOF

Changing the 90 in the template to 70 solves the problem; the workflow completes in time.
Note that this also applies to argo watch, but the timer only starts from when I start watching.

Message from the maintainers:
If you are impacted by this bug please add a 👍 reaction to this issue! We often sort issues this way to know what to prioritize.

See #2719

I think this was not solved.

:+1:  same problem here

there should be new debug output , could you run
argo --loglevel DEBUG watch ....
and paste the output

Can you also say what you're using for connection settings?

Note to self - could not repro locally. Theory - is there a proxy in between that drops connections every 90s?

Adding --loglevel DEBUG, here are the logs:
DEBU[0000] Piping events to channel
DEBU[0000] Received event
DEBU[0000] Sending event                                 phase=Running type=ADDED workflow=long-workflow-vdt44
Name:                long-workflow-vdt44
Namespace:           virtual
ServiceAccount:      default
Status:              Running
Created:             Fri Apr 24 11:37:30 +0800 (1 second ago)
Started:             Fri Apr 24 11:37:30 +0800 (1 second ago)
Duration:            1 second

STEP                    TEMPLATE  PODNAME              DURATION  MESSAGE
 ◷ long-workflow-vdt44  plan      long-workflow-vdt44  1s
DEBU[0001] Received event
DEBU[0001] Sending event                                 phase=Running type=MODIFIED workflow=long-workflow-vdt44
Name:                long-workflow-vdt44
Namespace:           virtual
ServiceAccount:      default
Status:              Running
Created:             Fri Apr 24 11:37:30 +0800 (1 second ago)
Started:             Fri Apr 24 11:37:30 +0800 (1 second ago)
Duration:            1 second

STEP                    TEMPLATE  PODNAME              DURATION  MESSAGE
 ◷ long-workflow-vdt44  plan      long-workflow-vdt44  1s        ContainerCreating
DEBU[0002] Received event
DEBU[0002] Sending event                                 phase=Running type=MODIFIED workflow=long-workflow-vdt44
Name:                long-workflow-vdt44
Namespace:           virtual
ServiceAccount:      default
Status:              Running
Created:             Fri Apr 24 11:37:30 +0800 (3 seconds ago)
Started:             Fri Apr 24 11:37:30 +0800 (3 seconds ago)
Duration:            3 seconds

STEP                    TEMPLATE  PODNAME              DURATION  MESSAGE
 ● long-workflow-vdt44  plan      long-workflow-vdt44  3s
DEBU[0078] Result channel done
FATA[0078] EOF

Excellent. This is exactly what I need.

@samath117 @lkeijser I have a fix - but no way to test it on your systems - if you Slack me (I can't figure out you handle from your Github profile) - I can send you build of the CLI to test out.

I was able to reproduce this with a local microk8s running in multipass.
First let's drop a lot of packets between the argo client and kubernetes.
# on the multipass vm
sudo iptables -A INPUT -m statistic --mode random --probability 0.1 -j DROP

Then verify we can reproduce the bug on v2.7.5
$ argo version
argo: v2.7.5
  BuildDate: 2020-04-21T00:55:31Z
  GitCommit: ede163e1af83cfce29b519038be8127664421329
  GitTreeState: clean
  GitTag: v2.7.5
  GoVersion: go1.13
  Compiler: gc
  Platform: darwin/amd64

$ argo submit long-workflow.yaml --watch
STEP                    TEMPLATE  PODNAME              DURATION  MESSAGE
 ◷ long-workflow-ppthn  plan      long-workflow-ppthn  1s        ContainerCreating
Name:                long-workflow-ppthn
Namespace:           acquia-polaris-system
ServiceAccount:      default
Status:              Running
Created:             Fri Apr 24 21:42:21 -0700 (10 seconds ago)
Started:             Fri Apr 24 21:42:21 -0700 (10 seconds ago)
Duration:            10 seconds

STEP                    TEMPLATE  PODNAME              DURATION  MESSAGE
 ● long-workflow-ppthn  plan      long-workflow-ppthn  9s
FATA[0070] EOF

Then try with https://github.com/argoproj/argo/pull/2830
./dist/argo version
argo: fix-2796+435cfc4.dirty
  BuildDate: 2020-04-24T21:50:19Z
  GitCommit: 435cfc415b6a1ca16ab0cfd0c9ce468c5c383e8c
  GitTreeState: dirty
  GitTag: 435cfc41
  GoVersion: go1.14.2
  Compiler: gc
  Platform: darwin/amd64

$ ./dist/argo submit long-workflow.yaml --watch
Name:                long-workflow-s5kpm
Namespace:           acquia-polaris-system
ServiceAccount:      default
Status:              Error
Message:             failed to save outputs: Failed to establish pod watch: unknown (get pods)
Created:             Fri Apr 24 21:44:32 -0700 (1 minute ago)
Started:             Fri Apr 24 21:44:32 -0700 (1 minute ago)
Finished:            Fri Apr 24 21:46:14 -0700 (now)
Duration:            1 minute 42 seconds

STEP                    TEMPLATE  PODNAME              DURATION  MESSAGE
 ⚠ long-workflow-s5kpm  plan      long-workflow-s5kpm  1m        failed to save outputs: Failed to establish pod watch: unknown (get pods)

With the patched argo cli there was no EOF error. I repeated this process twice and had consistent results.

@blkpe so are you saying the fix worked?

@alexec Yes!

I believe you network cuts the connection at 90s. The change re-establishes the connection when it is cut.


release new version after dockerfile

Can we have a new version released with the changes made in #17?

@renanqts I think we have this now. Let me know if we need something else.