TN5250 terminal is not opening

Issue: TN5250 terminal is not opening
I have installed TN5250 via yum on my machine and yet I am not able to spawn a TN5250 terminal inside VS Code.
Update: In the "Enabled Features" table below, I don't see tn5250 under /QOpenSys/pkgs/bin. Do I need to enable it inside VS Code? However, I am able to "which" them in the PASE editor.
below is the output of which command from PASE.
-bash-5.1$ which yum curl tn5250
/QOpenSys/pkgs/bin/yum
/QOpenSys/pkgs/bin/curl
/QOpenSys/pkgs/bin/tn5250
-bash-5.1$

This meansTN5250 is already installed in my IBMi machine and the $PATH variable is also set correctly.
I am also able to spawn the TN5250 manually from within PASE - which is kind of ugly looking and the F keys aren't working. Otherwise, I would be happily invoking a new session inside of PASE.
FYI, I tried the steps exactly as per
https://halcyon-tech.github.io/docs/#/pages/tips/terminals and
https://www.seidengroup.com/php-documentation/how-to-set-up-the-ibm-i-open-source-environment/
To Reproduce

Once connected to the IBMi system, click on the "Terminals" at the bottom of the VSCODE.
Select the terminal type 5250.
See below error

Expected behavior
TN5250 terminal should spawn.

Environment details

Context
Version

Code for IBM i version
2.0.0

Visual Studio Code version
1.80.0

Operating System
win32_x64

Active extensions
COBOL (cobol): 9.7.10
Code for IBM i Walkthroughs (vscode-ibmi-walkthroughs): 0.3.1
Db2 for IBM i (vscode-db2i): 0.2.11
Emmet (emmet): 1.0.0
Error Lens (errorlens): 3.11.1
Git (git): 1.0.0
Git Base (git-base): 1.0.0
GitHub (github): 0.0.1
GitHub Authentication (github-authentication): 0.0.2
IBM i Notebooks (vscode-ibmi-notebooks): 0.0.5
JSON Language Features (json-language-features): 1.0.0
Merge Conflict (merge-conflict): 1.0.0
Microsoft Account (microsoft-authentication): 0.0.1
Node Debug Auto-attach (debug-auto-launch): 1.0.0
RPGLE (vscode-rpgle): 0.19.3
TODO Highlight (vscode-todo-highlight): 1.0.5
TypeScript and JavaScript Language Features (typescript-language-features): 1.0.0
WSL: Recommender (remote-wsl-recommender): 0.0.19

Remote system

Setting
Value

IBM i OS
V7R4M0

Tech Refresh
8

CCSID
65535

SQL
Disabled

Source dates
Disabled

Enabled features
(I don't see the TN5250 enabled in the /QOpenSys/pkgs/bin)

/usr/bin
/QOpenSys/pkgs/bin
/QSYS.lib/ILEDITOR.lib
/QSYS.LIB
/QIBM/ProdData/IBMiDebugService/bin

attr
bash
GENCMDXML.PGM
QZDFMDB2.PGM
startDebugService.sh

iconv
chsh
GETNEWLIBL.PGM

setccsid
ls

tar
md5sum

sort

stat

Shell env
BUILDLIB=RAVISANKAR
CURLIB=RAVISANKAR
HOME=/home/ravisankar
LIBLS=QTEMP QGPL RAVISANKAR
LOGIN=ravisankar
LOGNAME=ravisankar
MAIL=/var/spool/mail/ravisankar
OLDPWD=/home/ravisankar
PASE_USRGRP_LIMITED=N
PATH=/QOpenSys/usr/bin:/usr/ccs/bin:/QOpenSys/usr/bin/X11:/usr/sbin:.:/usr/bin
PWD=/home/ravisankar
SHELL=/QOpenSys/pkgs/bin/bash
SHLVL=1
SSH_CLIENT=<IP_ADDRESS> 64228 22
SSH_CONNECTION=<IP_ADDRESS> 64228 <IP_ADDRESS> 22
TZ=<EST>5<EDT>,M3.2.0,M11.1.0
USER=ravisankar
USERNAME=ravisankar
_=/QOpenSys/usr/bin/env

Variants
{
  "american": "#@$",
  "local": "#@$"
}

Errors
[
  {
    "command": "system \"CRTLIB LIB(ILEDITOR) TEXT('Code for i temporary objects. May be cleared.')\"",
    "code": 255,
    "stderr": "CPF2111: Library ILEDITOR already exists.",
    "cwd": "/home/ravisankar"
  },
  {
    "command": "ls -p /QIBM/ProdData/IBMiDebugService/bin/certs/debug_service.pfx",
    "code": 2,
    "stderr": "/QIBM/ProdData/IBMiDebugService/bin/certs/debug_service.pfx not found",
    "cwd": "/home/ravisankar"
  }
]

Hello... Gentle reminder... I know this isn't a support thread, but I shall ask nowhere else!
I tried everything as per the document. One thing I did notice is that my CCSID is set to 65535 and I got a notification for the same. Do I need to change it to 37 in order to TN5250 to work? I don't have authority to change my default user profile entries.
Any help is appreciated!

Please share the contents of your Code for IBM i output channel after connecting to your system.

Hi Liam,
Sorry, it took me a while to reply. I actually lost access to the IBMi server (v7r4) using which I was originally trying to open TN5250 inside VSC. However, I replicated the same steps on a new server (v7r3) and here's the output of the console. Currently I have access only to this new (v7r3) server. Below is the output of "Code for IBM i" channel after connecting to my IBMi box.
/home/CECUSER: echo "This should be the only text!"
{
    "code": 0,
    "signal": null,
    "stdout": "This should be the only text!",
    "stderr": ""
}

.: pwd
{
    "code": 0,
    "signal": null,
    "stdout": "/home/CECUSER",
    "stderr": ""
}

/home/CECUSER: pwd
{
    "code": 0,
    "signal": null,
    "stdout": "/home/CECUSER",
    "stderr": ""
}

/home/CECUSER: /QOpenSys/usr/bin/qsh
liblist
{
    "code": 0,
    "signal": null,
    "stdout": "QSYS        SYS\nQSYS2       SYS\nQHLPSYS     SYS\nQUSRSYS     SYS\nQSHELL      PRD\nQGPL        USR\nQTEMP       USR",
    "stderr": ""
}

/home/CECUSER: system "CRTLIB LIB(ILEDITOR) TEXT('Code for i temporary objects. May be cleared.')"
{
    "code": 255,
    "signal": null,
    "stdout": "",
    "stderr": "CPF2111: Library ILEDITOR already exists."
}

/home/CECUSER: [ -d "/tmp" ]
{
    "code": 0,
    "signal": null,
    "stdout": "",
    "stderr": ""
}

/home/CECUSER: echo $SHELL
{
    "code": 0,
    "signal": null,
    "stdout": "/QOpenSys/pkgs/bin/bash",
    "stderr": ""
}

/home/CECUSER: ls -p /QIBM/ProdData/IBMiDebugService/bin/certs/debug_service.pfx
/home/CECUSER: LC_ALL=EN_US.UTF-8 system "call QSYS/QZDFMDB2 PARM('-d' '-i' '-t')"
select OS_VERSION || '.' || OS_RELEASE as VERSION from sysibmadm.env_sys_info
/home/CECUSER: LC_ALL=EN_US.UTF-8 system "call QSYS/QZDFMDB2 PARM('-d' '-i' '-t')"
select max(ptf_group_level) as HIGHEST_DB2_PTF_GROUP_LEVEL from qsys2.group_ptf_info where PTF_GROUP_DESCRIPTION like 'DB2 FOR IBM I%' and ptf_group_status = 'INSTALLED';
{
    "code": 2,
    "signal": null,
    "stdout": "",
    "stderr": "/QIBM/ProdData/IBMiDebugService/bin/certs/debug_service.pfx not found"
}

/home/CECUSER: LC_ALL=EN_US.UTF-8 system "call QSYS/QZDFMDB2 PARM('-d' '-i' '-t')"
select job_name, authorization_name from qsys2.netstat_job_info j where local_port = 8005 group by job_name, authorization_name
{
    "code": 0,
    "signal": null,
    "stdout": "DB2>\n  ?>\n\nVERSION                                                                                \n---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\n7.3                                                                                \n\n  1 RECORD(S) SELECTED.",
    "stderr": ""
}

{
    "code": 0,
    "signal": null,
    "stdout": "DB2>\n\nHIGHEST_DB2_PTF_GROUP_LEVEL \n----------------------------\n                          32\n\n  1 RECORD(S) SELECTED.\n\nDB2>",
    "stderr": ""
}

{
    "code": 1,
    "signal": null,
    "stdout": "DB2>\n  ?>\n\nJOB_NAME                     AUTHORIZATION_NAME \n---------------------------- -------------------\n\n  0 RECORD(S) SELECTED.",
    "stderr": ""
}

/: system "RUNSQLSTM SRCSTMF('/tmp/vscodetemp-O_OawWSnUh') COMMIT(*NONE) NAMING(*SQL)"
{
    "code": 0,
    "signal": null,
    "stdout": "5770SS1 V7R3M0 160422               Run SQL Statements             VSCODETEMP                         07/19/23 05:38:59   PAGE   1\nSource stream file......../tmp/vscodetemp-O_OawWSnUh\nTarget release............V7R3M0\nCommit....................*NONE\nNaming....................*SQL\nGeneration level..........10\nDate format...............*JOB\nDate separator............*JOB\nTime format...............*HMS\nTime separator ...........*JOB\nRight margin..............80\nDefault collection........*NONE\nIBM SQL flagging..........*NOFLAG\nANS flagging..............*NONE\nDecimal point.............*JOB\nSort sequence.............*JOB\nLanguage ID...............*JOB\nPrinter file..............*LIBL/QSYSPRT\nSource file CCSID.........1208\nJob CCSID.................37\nStatement processing......*RUN\nAllow copy of data........*OPTIMIZE\nAllow blocking............*ALLREAD\nSQL rules.................*DB2\nDecimal result options:\n  Maximum precision.......31\n  Maximum scale...........31\n  Minimum divide scale....0\nConcurrent access\n  resolution..............*DFT\nSystem time sensitive.....*YES\nSource member changed on 07/19/23  05:38:57\n5770SS1 V7R3M0 160422               Run SQL Statements             VSCODETEMP                         07/19/23 05:38:59   PAGE     2\nRecord  *...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ...+... 8   SEQNBR  Last change\n      1 CREATE OR REPLACE PROCEDURE ILEDITOR.GETNEWLIBL(IN COMMAND VARCHAR(2000))\n      2 DYNAMIC RESULT SETS 1\n      3 BEGIN\n      4   DECLARE clibl CURSOR FOR\n      5     SELECT ORDINAL_POSITION, TYPE as PORTION, SYSTEM_SCHEMA_NAME\n      6     FROM QSYS2.LIBRARY_LIST_INFO;\n      7   CALL QSYS2.QCMDEXC(COMMAND);\n      8   OPEN clibl;\n      9 END;\n                                 * * * * *  E N D  O F  S O U R C E  * * * * *\n5770SS1 V7R3M0 160422               Run SQL Statements             VSCODETEMP                         07/19/23 05:38:59   PAGE     3\nRecord  *...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ...+... 8   SEQNBR  Last change\nMSG ID  SEV  RECORD  TEXT\nSQL7989   0       1  Position 1 Procedure GETNEWLIBL was created in ILEDITOR.\n                    Message Summary\n  Total     Info   Warning      Error   Severe  Terminal\n      1        1         0          0        0         0\n00 level severity errors found in source\n                                * * * * *  E N D  O F  L I S T I N G  * * * * *",
    "stderr": ""
}

@ravisankar-PIO before connecting to your server, use the right click option on the server and ‘reload and connect’.

Phew, that solved it! Thank you so much Liam. I really appreciate your good work on IBMi and Open Source.
That being said, do we need to include this step in the documentation?

Also, do I need to fiddle with CCSID for the correct rendering of these junk characters? Below is the 5250 inside vsc.

This is the actual emulator from ACS.

That being said, do we need to include this step in the documentation?

@ravisankar-PIO Good idea. I have submitted a pull request to document the “Connect and Reload Server Settings" tip: https://github.com/codefori/docs/pull/18

Hi, I installed tn5250 via ACS to be able to use it on VSCODE and it doesn't work and when I do the "which yum curl tn5250" command
it returns
"no yum in /QOpenSys/usr/bin /usr/ccs/bin /QOpenSys/usr/bin/X11 /usr/sbin . /usr/bin
no curl in /QOpenSys/usr/bin /usr/ccs/bin /QOpenSys/usr/bin/X11 /usr/sbin . /usr/bin
no tn5250 in /QOpenSys/usr/bin /usr/ccs/bin /QOpenSys/usr/bin/X11 /usr/sbin . /usr/bin"
while the module is installed.

@GalonMitsunari

I installed tn5250 via ACS to be able to use it on VSCODE

If you have ACS installed, I would strongly recommend using the 5250 emulator in ACS instead of tn5250 - the latter has some caveats including keyboard mappings... see more in this discussion #1675 or search the issues section for tn5250...

Hi all,
Hope I'm on the right place for my problem.
Using TN5250 in Visual Studio to connect to my Host IBM i.
I'm able to connect and start a TN5250 session in VS but got some troubles for setting right CCSID session.
My iSeries CCSID is 65535, my iSeries language is 1147 (French Euro).
When I'm starting TN5250 got this type of screen

Saw tyhat I can put some options but don't know where to put these. Guess there's an ini file somewhere I can modify
Thanks for your feedbacks
Regards
Sylvain

@sboisier Did you set the 5250 encoding to '297' (French) in the Terminal tab in the Settings?

You can see all options for tn5250 by opening a PASE terminal and type man tn5250.
Then you can add any additional options to the connection string in the Terminal settings.

Hello, I have the same problem with accents, do you have solve it ? Thanks a lot

Hi,
Not yet as nobody's give me advices

From: Frédéric Petit @.>
Sent: Thursday, September 12, 2024 12:16 PM
To: codefori/vscode-ibmi @.>
Cc: Sylvain @.>; Mention @.>
Subject: Re: [codefori/vscode-ibmi] TN5250 terminal is not opening (Issue #1434)
Hello, I have the same problem with accents, do you have solve it ? Thanks a lot
—
Reply to this email directly, view it on GitHubhttps://github.com/codefori/vscode-ibmi/issues/1434#issuecomment-2345846226, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AHYAU7WYI5C4IR72O2JM7FDZWFSXHAVCNFSM6AAAAABJ5KU4BSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBVHA2DMMRSGY.
You are receiving this because you were mentioned.Message ID: @.***>

As far as I can tell, running tn5250 outside of VS Code, from an SSH terminal like putty gives the same result (characters are scrambled with CCSID 297).


Remove Super Stream Provider or a way to hide

Summary
Unsure if you are unaware Super Stream provider does not have a large current and old library of content it also promotes adult content xxx not sure if this is the direction you planned to take the app in. Also will u provide users with a "setting" feature so they can select their own personal options
Please confirm the following

[X] I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open issue.

Oh okay didn't know about that, it's was just an easy provider to add so I just implement it.
I will remove the adult contents!

I intend to add a settings page but it's so much work that I postpone it every time

Adult contents removed on Release 1.6.2


Duplicated Cursor in Debug Mode

VS Code Version: 1.56.0-insider
Commit:<PHONE_NUMBER>07c15252e581e8abe1b820b9d311ee
Electron: 11.4.1
Chrome: 87.0.4280.141
Node.js: 12.18.3
V8: <IP_ADDRESS>-electron.0
OS: Darwin arm64 20.3.0

Date: 2021-04-02T05:23:43.134Z
Here you can find a video where the bug occur:
https://imgur.com/01EGWC8
Steps to Reproduce:

Set up a breakpoint in a python file
Run debug

Does this issue occur when all extensions are disabled?: Yes/No
Can't launch debug in this case, because python extension is required.

That is not a cursor, but an inline indicator where the stop event happened.
However pushed a heuristic to only render it when the column is defined and > 1


Evaluation on RefCOCO

Hi. Thanks to sharing your nice work!
When I run eval.sh on RefCOCO testA, I got the error "No such file unc_testA.pth'.
I wonder Why unc_testA.pth file is needed during evaluation?
I also run generate_pseudo_data_unc.sh before evaluation and I got unc_train_pseudo_split.pth files, not unc_pseudo_val.pth or unc_pseudo_testA.pth.
Thanks.

The eval.sh is provided to reproduce the results reported in the paper. For RefCOCO, we report the results on val/testA/testB splits.
We need to evaluate the performance on the manually annotated val/test for fair comparison with other methods. Thus, the pseudo samples are only used in training.
You can download the manually annotated val/test from this link.

Then, unc_testA.pth, unc_testB.pth, unc_val.pth files mean the manually annotated val/test datasets?

Yes, val/testA/testB are manually annotated which are original data from each dataset. The pseudo samples are only used in training.
The download link for detection results and unc+_train_imagelist_split.txt files are already provided in the README.md.

Oh, I got it.
Thanks for your quick reply!


function's object name property and class names

Hello!
At the moment:
FF ignores 'name'

V8 respects 'name' BUT it is used differently in trace produced by:

	1) console.trace
	2) throw "Test"

		AND

	3) (new Error).stack
	4) <any code that results in uncaught error>

(1) and (2) simply present name's value as is
(3) and (4) prepend it with a class name if there's such

I belive this should be standardised (if someone could point me to the part of the proposal that deals with it - thanks in advance, I'm not good with them yet & simple text search for "class" in current specification yields 0 results)
While the current inconsistency makes getting always sensible stack trace for ES6 and framework-based OOP code impossible, I'm more concerned that the practice of prepending configurable "name" property with class name can become a standard.
As I understand, "name" was made configurable to let developers get meaningful stack traces for whatever OOP framework they use. Then (correct me if there're other use cases), the fact the "name" is used means developer takes full responsibility of how function name is represented in stack trace, it's not a browser's concern any more, so it must not prepend it with anything or process it in any other way.
In frameworks that have concept of extending a class, the factual constructor name is a generic "pre-constructor" function, hence factual full method names are similar to constructor.doThis and constructor.doThat ("constructor" instead of the real class name)
"name" allows framework to prefix method names with real class names, i.e. "ClassName.doThis", but trace (3) and (4) display it as "constructor.ClassName.doThis"
There's also a problem of static methods allowed by ES6.
V8 currently prepends them with "Function."
Obviously there should be a class name instead, but I cannot think of a representation that would satisfy everyone: both static and dynamic methods are called with . operator - how to clearly show which one it is?
Configurable "name" lets everyone choose whatever makes sense to them, i.e. show static one as A:a (vs. A.a) etc.
I am not sure though, if it's possible to say whether the configurable property has been modified or not.
If no, a simple solution would be to consider it modified if it is not a valid function name (this covers A.a and similar representations), though it feels hackish so I'm not sure browsers would want to implement it.

This proposal can’t force any changes on engines - in other words, we’re constrained to specify what they already do.
If there’s a single engine’s behavior that you think should be changed, then that engine needs to be convinced to change it.

thank you! Sorry, new to this


[Design] View if a file has multiple versions

As a user, I would like to know when looking at a file that multiple versions exist so that I can know if I should look at the history of the file.

Blocks #555


baseFile is compulsory and can not get current folder name

In my current situation, I am trying to rename bunch of directories and 99% of them contains baseFile but some exception modules does not contain that file. Right now rename task fails as it expects baseFile compulsory.
Also it would be better to provide current folder name as argument to renameTo function, if someone wants to just rename based on current name and does not want to have a baseFile. (That's what my case is)
In my requirement all folder names are like<EMAIL_ADDRESS>and i want to rename all to remove the version part (i.e. @1.2.3 part) from name.

Hi, thanks for your issue.
if I understand you correctly:
One task would be to not fail when there is no basefile but to simply ignore the folder. I agree that this seems to be a good way of handling that. You wanna send a PR for that?
And the second is to simply rename a folder matching a certain structure.
I wonder if  (gulp-rename)[https://www.npmjs.com/package/gulp-rename] isn't the better option for that, used for example like this:
gulp.src("./src/**/*")
  .pipe(rename(function (path) {
    path.dirname =<EMAIL_ADDRESS>'');
  }))

I didn't test the above - but maybe it helps you?

Thanks for the response.
Yes, I ended up using gulp-rename with similar function and that works for me as of now. For that ignore part, I'll try to build and send a PR soon.

Implemented and added discussed PR.

Closing this as I merged the PR.


transaction commit no longer work for version 2.1.8

here is the error stack
Error: com.orientechnologies.orient.core.exception.OStorageException: Error during transaction commit.
Error: java.lang.NullPointerException

@martingg88 Can you provide a full stack trace?

i don't have the full stack now. it doesn't work with orientjs. can you try a simple sql transaction statement at you end?

It actually works if you run your query in the transaction by using the console.sh though. Not sure if it will work if I run a query from some Java code.

Hi @martingg88
can you provide a simple test case to reproduce the problem?
Thanks
Luigi

i will get back to you when i free as i'm stuck with the orientdb crash with my server.

Hi @martingg88 ,
Could I ask you to create test, to resolve given issue ?

please close this issue. I dun have this issue again.


[7.x] Cache forgotten properties on route object

These properties also need to be restored properly in order to make Route::view and Route::redirect work.
Fixes https://github.com/laravel/framework/issues/31567

How does this affect performance?

I doubt it'll have a big impact.

Actually, it should have no impact at all since it doesn't affects anything about Symfony's new matcher.

It's kinda a shame we have no test coverage for that bug.


Import types preset should work with typescript-resolver

Is your feature request related to a problem? Please describe.
Right now the the import-types preset mostly works with the typescript-resolver plugin except for the import that seems to be missing.
Describe the solution you'd like
Make sure the import is included in the file and it will work perfectly. This seems to be due to the condition check it does to verify if it should include the file or not.
Describe alternatives you've considered
Currently adding the import with:
      - add:
          content: "import type * as Types from './shared';"

Ha it is also missing the mappers support on the typescript plugin directly, bit annoying.


Is there a feature to fetch all tweets by a user?

Is there currently a feature to just fetch all tweets form a user / profile? The README and the API doc is a bit different in what features are mentioned as already implemented. For example, assume you wanted to fetch all tweets by XDeveloers like https://x.com/XDevelopers. The Twitter Publish widget used to be able to do this but seems to be kind of broken these days based on numerous posts on Reddit etc.
Thanks.

No, currently, there is no way to fetch all tweets by a user, except using the tweet.search function with the fromUsers filter (remember that tweet.search is the most reliable and recommended method for fetching tweets), and calling it over and over again, until you run out of search results.


"load_and_authorize_resource" throwing ActiveRecord::RecordNotFound for inexistent resource and its "find_by" option doesn't seem helpful either

Rails 4.2.0
Ruby 2.2.1 [ x86_64 ]
Devise 3.4.1
CanCanCan 1.10.1.

app/models/ability.rb
class Ability
  include CanCan::Ability

  def initialize(user)
    user ||= User.new # in case of guest

    if user.is_admin?
      can :manage, :all
    end
  end
end

app/models/user.rb
class User < ActiveRecord::Base
  # Include default devise modules. Others available are:
  # :confirmable, :lockable, :timeoutable and :omniauthable
  devise :database_authenticatable, :registerable,
         :recoverable, :rememberable, :trackable, :validatable

  has_one :role_assignment, dependent: :destroy
  has_one :role, through: :role_assignment

  validates_presence_of :role, message: "must be selected"

  include RoleMethods

end

app/models/concerns/role_methods.rb
module RoleMethods
  extend ActiveSupport::Concern

  def has_role?(role_sym)
    return false unless role.present?
    role.name.to_sym == role_sym
  end

  def has_no_role?
    role.blank?
  end

  def is_admin?
    has_role?(:admin)
  end
end

app/controllers/users_controller.rb
class UsersController < ApplicationController
  before_action :authenticate_user!
  load_and_authorize_resource

  # DELETE /users/:id(.:format)
  def destroy
    @user.destroy

    if @user.destroyed?
      flash.now[:notice] = "Successfully removed user<EMAIL_ADDRESS>    else
      flash.now[:alert] =<EMAIL_ADDRESS>was not successfully removed"
    end

    redirect_to users_path, flash: flash.to_hash
  end
end

spec/controllers/users_controller_spec.rb
require 'rails_helper'

RSpec.describe UsersController, type: :controller do
  let!(:current_user) { create(:admin) }

  before do
    sign_in(current_user)
  end

  after do
    sign_out(current_user)
  end

  context "DELETE #destroy" do
    let!(:user) { create(:user) }

    let!(:params) { {}.merge(id: user.id) }

    context "inexistent user" do
      before do
        params.merge!(id: -1)
      end

      it "redirects the user to users listing page with an error message" do
        delete :destroy, params
        expect(response).to redirect_to(users_path)
        expect(flash[:alert]).to be_present
      end
    end
  end
end

The rspec example fails with ActiveRecord::RecordNotFound error:
UsersController
  DELETE #destroy
    inexistent user
      redirects the user to users listing page with an error message (FAILED - 1)

Failures:

  1) UsersController DELETE #destroy inexistent user redirects the user to users listing page with an error message
     Failure/Error: delete :destroy, params
     ActiveRecord::RecordNotFound:
       Couldn't find User with 'id'=-1
     # ~/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.0/lib/active_record/core.rb:154:in `find'
     # ~/.rvm/gems/ruby-2.2.1/gems/cancancan-1.10.1/lib/cancan/model_adapters/abstract_adapter.rb:20:in `find'
     # ~/.rvm/gems/ruby-2.2.1/gems/cancancan-1.10.1/lib/cancan/controller_resource.rb:116:in `find_resource'
     # ~/.rvm/gems/ruby-2.2.1/gems/cancancan-1.10.1/lib/cancan/controller_resource.rb:68:in `load_resource_instance'
     # ~/.rvm/gems/ruby-2.2.1/gems/cancancan-1.10.1/lib/cancan/controller_resource.rb:32:in `load_resource'
     # ~/.rvm/gems/ruby-2.2.1/gems/cancancan-1.10.1/lib/cancan/controller_resource.rb:25:in `load_and_authorize_resource'
     # ~/.rvm/gems/ruby-2.2.1/gems/cancancan-1.10.1/lib/cancan/controller_resource.rb:10:in `block in add_before_filter'
     # ~/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:443:in `instance_exec'
     # ~/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:443:in `block in make_lambda'
     # ~/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:163:in `call'
     # ~/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:163:in `block in halting'
     # ~/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `call'
     # ~/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `block in halting'
     # ~/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `call'
     # ~/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `block in halting'
     # ~/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:234:in `call'
     # ~/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:234:in `block in halting'
     # ~/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:234:in `call'
     # ~/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:234:in `block in halting'
     # ~/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `call'
     # ~/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `block in halting'
     # ~/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `call'
     # ~/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `block in halting'
     # ~/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `call'
     # ~/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `block in halting'
     # ~/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:92:in `call'
     # ~/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:92:in `_run_callbacks'
     # ~/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:734:in `_run_process_action_callbacks'
     # ~/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:81:in `run_callbacks'
     # ~/.rvm/gems/ruby-2.2.1/gems/actionpack-4.2.0/lib/abstract_controller/callbacks.rb:19:in `process_action'
     # ~/.rvm/gems/ruby-2.2.1/gems/actionpack-4.2.0/lib/action_controller/metal/rescue.rb:29:in `process_action'
     # ~/.rvm/gems/ruby-2.2.1/gems/actionpack-4.2.0/lib/action_controller/metal/instrumentation.rb:31:in `block in process_action'
     # ~/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.0/lib/active_support/notifications.rb:164:in `block in instrument'
     # ~/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.0/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
     # ~/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.0/lib/active_support/notifications.rb:164:in `instrument'
     # ~/.rvm/gems/ruby-2.2.1/gems/actionpack-4.2.0/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
     # ~/.rvm/gems/ruby-2.2.1/gems/actionpack-4.2.0/lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
     # ~/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.0/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
     # ~/.rvm/gems/ruby-2.2.1/gems/actionpack-4.2.0/lib/abstract_controller/base.rb:137:in `process'
     # ~/.rvm/gems/ruby-2.2.1/gems/actionview-4.2.0/lib/action_view/rendering.rb:30:in `process'
     # ~/.rvm/gems/ruby-2.2.1/gems/actionpack-4.2.0/lib/action_controller/test_case.rb:629:in `process'
     # ~/.rvm/gems/ruby-2.2.1/gems/actionpack-4.2.0/lib/action_controller/test_case.rb:65:in `process'
     # ~/.rvm/gems/ruby-2.2.1/gems/devise-3.4.1/lib/devise/test_helpers.rb:19:in `block in process'
     # ~/.rvm/gems/ruby-2.2.1/gems/devise-3.4.1/lib/devise/test_helpers.rb:72:in `catch'
     # ~/.rvm/gems/ruby-2.2.1/gems/devise-3.4.1/lib/devise/test_helpers.rb:72:in `_catch_warden'
     # ~/.rvm/gems/ruby-2.2.1/gems/devise-3.4.1/lib/devise/test_helpers.rb:19:in `process'
     # ~/.rvm/gems/ruby-2.2.1/gems/actionpack-4.2.0/lib/action_controller/test_case.rb:529:in `delete'
     # ./spec/controllers/users_controller_spec.rb:298:in `block (4 levels) in <top (required)>'
     # ./spec/rails_helper.rb:59:in `block (3 levels) in <top (required)>'
     # ~/.rvm/gems/ruby-2.2.1/gems/database_cleaner-1.4.1/lib/database_cleaner/generic/base.rb:15:in `cleaning'
     # ~/.rvm/gems/ruby-2.2.1/gems/database_cleaner-1.4.1/lib/database_cleaner/base.rb:92:in `cleaning'
     # ~/.rvm/gems/ruby-2.2.1/gems/database_cleaner-1.4.1/lib/database_cleaner/configuration.rb:86:in `block (2 levels) in cleaning'
     # ~/.rvm/gems/ruby-2.2.1/gems/database_cleaner-1.4.1/lib/database_cleaner/configuration.rb:87:in `call'
     # ~/.rvm/gems/ruby-2.2.1/gems/database_cleaner-1.4.1/lib/database_cleaner/configuration.rb:87:in `cleaning'
     # ./spec/rails_helper.rb:58:in `block (2 levels) in <top (required)>'

Finished in 1.03 seconds (files took 1.71 seconds to load)
1 example, 1 failure

Failed examples:

rspec ./spec/controllers/users_controller_spec.rb:297 # UsersController DELETE #destroy inexistent user redirects the user to users listing page with an error message

I tried using find_by option on load_and_authorize_resource using a full find method name in following manner ( references: here and here) :
load_and_authorize_resource find_by: :find_by_id
however that failed the spec with following error:
UsersController
  DELETE #destroy
    inexistent user

  An error occurred in an `around(:example)` hook
    PG::InFailedSqlTransaction: ERROR:  current transaction is aborted, commands ignored until end of transaction block

    occurred at ~/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:215:in `exec'

      redirects the user to users listing page with an error message (FAILED - 1)

Failures:

  1) UsersController DELETE #destroy inexistent user redirects the user to users listing page with an error message
     Failure/Error: delete :destroy, params
     ActiveRecord::StatementInvalid:
       PG::UndefinedColumn: ERROR:  column users.find_by_id does not exist
       LINE 1: SELECT  "users".* FROM "users" WHERE "users"."find_by_id" = ...
                                                    ^
       : SELECT  "users".* FROM "users" WHERE "users"."find_by_id" = '-1' LIMIT 1
     # ~/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:592:in `async_exec'
     # ~/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:592:in `block in exec_no_cache'
     # ~/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract_adapter.rb:466:in `block in log'
     # ~/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.0/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
     # ~/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract_adapter.rb:460:in `log'
     # ~/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:592:in `exec_no_cache'
     # ~/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql_adapter.rb:584:in `execute_and_clear'
     # ~/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.0/lib/active_record/connection_adapters/postgresql/database_statements.rb:160:in `exec_query'
     # ~/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/database_statements.rb:336:in `select'
     # ~/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/database_statements.rb:32:in `select_all'
     # ~/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.0/lib/active_record/connection_adapters/abstract/query_cache.rb:70:in `select_all'
     # ~/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.0/lib/active_record/querying.rb:39:in `find_by_sql'
     # ~/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.0/lib/active_record/relation.rb:638:in `exec_queries'
     # ~/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.0/lib/active_record/relation.rb:514:in `load'
     # ~/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.0/lib/active_record/relation.rb:243:in `to_a'
     # ~/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.0/lib/active_record/relation/finder_methods.rb:487:in `find_take'
     # ~/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.0/lib/active_record/relation/finder_methods.rb:105:in `take'
     # ~/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.0/lib/active_record/relation/finder_methods.rb:84:in `find_by'
     # ~/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.0/lib/active_record/querying.rb:7:in `find_by'
     # ~/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.0/lib/active_record/core.rb:172:in `find_by'
     # ~/.rvm/gems/ruby-2.2.1/gems/cancancan-1.10.1/lib/cancan/controller_resource.rb:111:in `find_resource'
     # ~/.rvm/gems/ruby-2.2.1/gems/cancancan-1.10.1/lib/cancan/controller_resource.rb:68:in `load_resource_instance'
     # ~/.rvm/gems/ruby-2.2.1/gems/cancancan-1.10.1/lib/cancan/controller_resource.rb:32:in `load_resource'
     # ~/.rvm/gems/ruby-2.2.1/gems/cancancan-1.10.1/lib/cancan/controller_resource.rb:25:in `load_and_authorize_resource'
     # ~/.rvm/gems/ruby-2.2.1/gems/cancancan-1.10.1/lib/cancan/controller_resource.rb:10:in `block in add_before_filter'
     # ~/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:443:in `instance_exec'
     # ~/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:443:in `block in make_lambda'
     # ~/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:163:in `call'
     # ~/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:163:in `block in halting'
     # ~/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `call'
     # ~/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `block in halting'
     # ~/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `call'
     # ~/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `block in halting'
     # ~/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:234:in `call'
     # ~/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:234:in `block in halting'
     # ~/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:234:in `call'
     # ~/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:234:in `block in halting'
     # ~/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `call'
     # ~/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `block in halting'
     # ~/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `call'
     # ~/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `block in halting'
     # ~/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `call'
     # ~/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:169:in `block in halting'
     # ~/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:92:in `call'
     # ~/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:92:in `_run_callbacks'
     # ~/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:734:in `_run_process_action_callbacks'
     # ~/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.0/lib/active_support/callbacks.rb:81:in `run_callbacks'
     # ~/.rvm/gems/ruby-2.2.1/gems/actionpack-4.2.0/lib/abstract_controller/callbacks.rb:19:in `process_action'
     # ~/.rvm/gems/ruby-2.2.1/gems/actionpack-4.2.0/lib/action_controller/metal/rescue.rb:29:in `process_action'
     # ~/.rvm/gems/ruby-2.2.1/gems/actionpack-4.2.0/lib/action_controller/metal/instrumentation.rb:31:in `block in process_action'
     # ~/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.0/lib/active_support/notifications.rb:164:in `block in instrument'
     # ~/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.0/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
     # ~/.rvm/gems/ruby-2.2.1/gems/activesupport-4.2.0/lib/active_support/notifications.rb:164:in `instrument'
     # ~/.rvm/gems/ruby-2.2.1/gems/actionpack-4.2.0/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
     # ~/.rvm/gems/ruby-2.2.1/gems/actionpack-4.2.0/lib/action_controller/metal/params_wrapper.rb:250:in `process_action'
     # ~/.rvm/gems/ruby-2.2.1/gems/activerecord-4.2.0/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
     # ~/.rvm/gems/ruby-2.2.1/gems/actionpack-4.2.0/lib/abstract_controller/base.rb:137:in `process'
     # ~/.rvm/gems/ruby-2.2.1/gems/actionview-4.2.0/lib/action_view/rendering.rb:30:in `process'
     # ~/.rvm/gems/ruby-2.2.1/gems/actionpack-4.2.0/lib/action_controller/test_case.rb:629:in `process'
     # ~/.rvm/gems/ruby-2.2.1/gems/actionpack-4.2.0/lib/action_controller/test_case.rb:65:in `process'
     # ~/.rvm/gems/ruby-2.2.1/gems/devise-3.4.1/lib/devise/test_helpers.rb:19:in `block in process'
     # ~/.rvm/gems/ruby-2.2.1/gems/devise-3.4.1/lib/devise/test_helpers.rb:72:in `catch'
     # ~/.rvm/gems/ruby-2.2.1/gems/devise-3.4.1/lib/devise/test_helpers.rb:72:in `_catch_warden'
     # ~/.rvm/gems/ruby-2.2.1/gems/devise-3.4.1/lib/devise/test_helpers.rb:19:in `process'
     # ~/.rvm/gems/ruby-2.2.1/gems/actionpack-4.2.0/lib/action_controller/test_case.rb:529:in `delete'
     # ./spec/controllers/users_controller_spec.rb:298:in `block (4 levels) in <top (required)>'
     # ./spec/rails_helper.rb:59:in `block (3 levels) in <top (required)>'
     # ~/.rvm/gems/ruby-2.2.1/gems/database_cleaner-1.4.1/lib/database_cleaner/generic/base.rb:15:in `cleaning'
     # ~/.rvm/gems/ruby-2.2.1/gems/database_cleaner-1.4.1/lib/database_cleaner/base.rb:92:in `cleaning'
     # ~/.rvm/gems/ruby-2.2.1/gems/database_cleaner-1.4.1/lib/database_cleaner/configuration.rb:86:in `block (2 levels) in cleaning'
     # ~/.rvm/gems/ruby-2.2.1/gems/database_cleaner-1.4.1/lib/database_cleaner/configuration.rb:87:in `call'
     # ~/.rvm/gems/ruby-2.2.1/gems/database_cleaner-1.4.1/lib/database_cleaner/configuration.rb:87:in `cleaning'
     # ./spec/rails_helper.rb:58:in `block (2 levels) in <top (required)>'

Looking at the source code https://github.com/CanCanCommunity/cancancan/blob/master/lib/cancan/controller_resource.rb#L111 it seems like the else branch, in source code-snippet shown below, can never be reached because the elsif clause gets evaluated to true in my case:
 elsif resource_base.respond_to? "find_by"
       resource_base.send("find_by", { @options[:find_by].to_sym => id_param })
 else
      resource_base.send(@options[:find_by], id_param)
 end

It seems this is because of Rails 4 introduction of find_by and find_by! methods.
Thanks,
Jiggneshh

I too have run into this issue. +1

@Senjai Hi, I found that the https://github.com/CanCanCommunity/cancancan/commit/4a5700c07e10b9144629f1ae63e0feb195204472 was added at a point of time when rails did not support find_by method. So I rearranged the order of the "if else" conditions in the below manner
if resource_base.respond_to? "find_by_#{@options[:find_by]}!"
  resource_base.send("find_by_#{@options[:find_by]}!", id_param)
elsif resource_base.respond_to? @options[:find_by]
  resource_base.send(@options[:find_by], id_param)
else
  resource_base.send("find_by", { @options[:find_by].to_sym => id_param })
end

This does make all the current specs pass, and prevents the "PG::UndefinedColumn: ERROR:  column users.find_by_id does not exist" from happening. Can you please tell me whether this will serve our purpose or I am missing something.


convert charset to UTF-8 with BOM.

convert charset to UTF-8 with BOM.
non-ASCII characters are problematic for orientals.

Sorry, we won't modify thirdparty source files this way.
BOM is also a misfeature, you should configure your IDE to use UTF-8 and not rely on the BOM to detect that.
Can you be more specific about what the issue is?


make executable

should resolve https://github.com/ix-plugin-hub/iocage-plugin-index/issues/163 :smile:

I don't know what solution you used, I found git update-index --chmod=+x ./post_install.sh

By the way : Thank a lot !!!

I don't know what solution you used, I found git update-index --chmod=+x ./post_install.sh

I'm working from my (Linux) computer, not from the GitHub website
These are the steps I took:
First I made a fork of your repository.
Then, from my computer I ran the following commands
git clone https://github.com/tprelog/iocage-plugin-movienight.git
cd iocage-plugin-movienight
chmod +x post_install.sh
git commit -am "make executable"
git push

Finally I made pull-request from my fork back to you

By the way : Thank a lot !!!

No problem, I'm glad this helped :)

I don't know what solution you used, I found git update-index --chmod=+x ./post_install.sh

I'm working from my (Linux) computer, not from the GitHub website
GOt it, my problem is I'm working from an Windows computer, so i don't have any chmod.
These are the steps I took:
First I made a fork of your repository.
Then, from my computer I ran the following commands
git clone https://github.com/tprelog/iocage-plugin-movienight.git
cd iocage-plugin-movienight
chmod +x post_install.sh
git commit -am "make executable"
git push

Finally I made pull-request from my fork back to you
I definitely know the steps you went through. I mean I'm no sys-admin but I know about chmod.
I was just thinking that Git didn't carry the ...

By the way : Thank a lot !!!

No problem, I'm glad this helped :)


Add CalculateAverage_moysesb

Yet another mmap based implementation. My implementation cannot compete with the ones using open hash arrays, but I'm curious to see how it does in the target machine.
My system has a i7-8750H CPU (6 cores ,12 "threads") and 16GB RAM. My implementation finishes in ~22s, while the reference implementation finishes in ~3.2min.

Could you please take a look at the test failures reported by
./test.sh moysesb

And remove the "test failure" label once done? Thx!

Oops, sorry, should have run the tests yesterday before pushing.

About the test failure label, I don't think I have write access to labels in this repo.

Oops, sorry, should have run the tests yesterday before pushing.

No worries, just added this earlier today to cover some corner cases (should have done so from the beginning).

@moysesb, something still is wrong, the output differs from that of the reference implementation (min/max values). Could you take a look?

What's the procedure for checking the calculated values? I generated a couple of measurement inputs locally with create_measurements.sh (from 1_000 to 10_000_000 lines) and the results are always the same between my class and the baseline.

Can you try and create one with 1B rows actually? If I'd have to guess, I'd
say there's some value overflow somewhere.

Message ID: @.***>

Yeah, that was it. Last chunk was being truncated because I can't do basic arithmetic :/
Fixed (I hope).

00:32.764 Nice!


Add "mkdocs" project

https://github.com/mkdocs/mkdocs/blob/0a4f3240d136e31bf283750f999c46ddf760567b/pyproject.toml#L151

@hauntsaninja Shouldn't it install the project itself and get these dependencies from there?


Added xenon tutorials

Added both the 2017 and (upcoming) 2019 Xenon tutorials

Future events DO appear on website: https://escience-academy.github.io/ -- so not a bug, not a feature...


Added Fei Protocol whitepaper to stablecoin RFP resources

Fei Protocol creates a stablecoin that uses direct incentives and protocol owned value to peg to a price. It's decentralized and doesn't rely on an over-collateralization mechanism.
Personally, I think the project is pretty promising. https://coinmarketcap.com/currencies/fei-protocol/
Project Abstract

Please provide a brief description of your project here summarising key points (1-2 paragraphs).
If your application is a follow-up to a previous grant, please mention which one in the first line of the abstract and include a link to previous pull requests if applicable.

For which grant level are you applying?

[ ] Level 1:  Up to $10,000, 2 approvals
[ ] Level 2:  Up to $50,000, 3 approvals
[ ] Level 3:  Unlimited, 5 approvals (for > $100k Web3 Foundation Council approval)

Application Checklist

[x] The application template has been copied, renamed ( project_name.md) and updated.
[ ] A BTC or Ethereum (DAI/USDT) address for the payment of the milestones is provided inside the application.
[ ] I have read and acknowledged the terms and conditions.
[ ] The software delivered for this grant will be released under an open-source license specified in the application.
[ ] The initial PR contains only one commit (squash and force-push if needed).
[ ] The grant will only be announced once the first milestone has been accepted.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

Thanks for adding these links to the RFP. I will also add Terra (LUNA), which I think is the most promising after looking into it a little bit more.


In tutorial Formula generates DecimalColumn even though text_type is specified?

See traceback on #201

Pretty sure I fixed this during recent refactoring, but need to audit to confirm.

99% sure this is fixed.


CFFL

CFFL

Linter check found the following problems:
The following problems have been found:
ERROR: /tmp/abs_a4r7cvmmho/clone/recipe/meta.yaml:14: pip_install_args: pip install should be run with --no-deps.
ERROR: /tmp/abs_a4r7cvmmho/clone/recipe/meta.yaml:21: missing_wheel: For pypi packages, wheel should be present in the host section
ERROR: /tmp/abs_a4r7cvmmho/clone/recipe/meta.yaml:29: missing_pip_check: For pypi packages, pip check should be present in the test commands
ERROR: /tmp/abs_a4r7cvmmho/clone/recipe/meta.yaml:36: missing_license_family: The recipe is missing the about/license_family key.
WARNING: /tmp/abs_a4r7cvmmho/clone/recipe/meta.yaml:36: missing_description: The recipe is missing a description
ERROR: /tmp/abs_a4r7cvmmho/clone/recipe/meta.yaml:36: missing_documentation: The recipe is missing a doc_url or doc_source_url
Errors were found


Allow reloading of C mods

The DLL file for a c mod is never released by the game, closing a world or unchecking the mod in the creation menu should unload the DLL so a full game restart is not needed to update the mod

I did look into this, but I don't think there is a good solution engine-side. For now it's just something that will need to be managed in your development environment. You should be able to get your build tools to at least kill and relaunch the game when you do a build, so then in-game it is just a matter of hitting escape to skip the menu, and enter to continue.


Update machine-learning-r-csharp-difference-in-two-proportions.md

Hi @nk773, I'm your friendly neighborhood Azure Pull Request Bot (You can call me AZPRBOT). Thanks for your contribution!

It looks like you're working at Microsoft (neerajkh). If you're full-time, we DON'T require a contribution license agreement.

If you are a vendor, DO please sign the electronic contribution license agreement. It will take 2 minutes and there's no faxing! https://cla.azure.com.

TTYL, AZPRBOT;

@nk773
Please correct the date format. Month and day must be two digits each, so it should be 02/28/2016. Thanks.


Updates to Swift 4

Only project settings, no code changes :)

The CI is broken... We can't run unit tests against prod API, because I don't wanna share my credentials :P Let's merge this anyway! :D


Handle +OK and -ERR without additional info

Handle +OK and -ERR responses without additional info (global vars: respOK, respErr).
Move bOK inside parseResp() to global var and renamed to respOKInfo.
Move bERR inside parseResp() to global var and renamed to respErrInfo.
Include actual response in error message.

Notes:

Dovecot returns +OK if authentication succeeds.
According to RFC 1081, it's possible server returns +OK and -ERR without additional info. https://datatracker.ietf.org/doc/html/rfc1081

Just hit this with a Cyrus POP server too:
>1632912009>+OK Mailbox locked and ready SESSIONID=<cyrus-1632911999-23579-1-2522748370243218022>
<1632912009<NOOP
>1632912009>+OK
<1632912009<QUIT
>1632912009>+OK

and
2021/09/29 10:25:00error scanning bounce mailbox: unknown response. Neither -ERR, nor +OK.

so it looks like at least Cyrus and Dovecot return bare +OK


json1/json2 is not work.

https://github.com/sougou/parser_tutorial/blob/master/json1/parser.y
and
https://github.com/sougou/parser_tutorial/blob/master/json2/parser.y
is not working with current version of goyacc

Fixed: https://github.com/sougou/parser_tutorial/commit/021508160991a550bf1b1169971daab699ab6607


Unreal Engine 4 usage instructions

This is a simple documentation page that should explain how to use the EnTT library with a Unreal Engine 4 project.

I'll wait a couple of days to see if someone (other than me) wants to review this and to suggest something. Then, I'll merge it upstream.
Really thank you very much for your PR. Really appreciated!


How to use Finetuned checkpoint for Caption on COCO

Hi, thanks for the great work with this project. I am trying to load the "Finetuned checkpoint for Caption on COCO" but it seems like it is not compatible with hugging face transformers format. Is there any simple way of loading the checkpoint with HF?

OFA doesn't support HF transformers. You can use the code from this repo for fine-tuning


it will terminate early if expected.length != supplied.length

it will terminate early if expected.length != supplied.length

This will only terminate early if the two objects are identical.

no, if expected and supplied are not identical and expected.length not equals the supplied.length, it will run this code:"return !Arrays.constantTimeAreEqual(expected, expected);", it will terminate early while call constantTimeAreEqual secondly.

I think I must have been having a slow day yesterday, I thought I might have been missing something. Yes, this will help improve the "messing with the attacker's head" value. Merged. Thanks.


Updates to make build on Arch Linux

These are the changes I made to make the LLVM backend build properly on Arch linux (including updated build instructions).
Note that I don't think this can be merged as-is, because Ubuntu still needs LLVM 6.0, and this updates to LLVM 7.0. @dwightguth do you know how to set the version of LLVM based on the distro, or how to make CMakeLists.txt not care about the version?

Closing as this has been superceded by #80


Package for Fedora / RHEL / CentOS

I am working on this.
Currently I first need to package launchpad.net/go-xdg/v0 and github.com/codegangsta/cli.

github.com/codegangsta/cli is already packaged.

FYI the xdg package already exists in Debian, but it has a non-standard name. Don't know why.
https://packages.debian.org/sid/golang-go-xdg-dev

package review for golang-launchpad-go-xdg-v0: https://bugzilla.redhat.com/show_bug.cgi?id=1279660

I filed an issue against firewalld to better support the privet use case:
https://github.com/t-woerner/firewalld/issues/55
Right now the only way to support privet with firewalld is to open all the ephemeral ports. For Fedora Workstation it doesn't matter, since the default firewalld config does this. But this is not the default on Fedora Server nor CentOS.

I'm not familiar with firewalld, but if it helps, we could limit the port range with a config value. The libraries don't make this simple, but I don't think it would be hard to implement.

The last dependency for Fedora is packaged:
https://admin.fedoraproject.org/pkgdb/package/golang-launchpad-go-xdg-v0/
It will be appearing in f22, f23, rawhide, and el7.
There may be more el7 dependencies to work through.
I have not looked at el6 yet at all.

el6 looks similar dependency-wise. I will package xdg for el6 as well.
el6 will be a little more work from the others mostly because of logging and systemd, but should be doable.

el6 should be fine. "go get" works just fine (except for https://bugzilla.redhat.com/show_bug.cgi?id=1253897). I think all dependencies are packaged.

This is a little tricky still since the policies for RHEL7 are not well documented. Fedora and RHEL6 should be fine.

I've not made any progress here since Fedora hasn't yet figured out a complete (non-draft) packaging story for Go.
https://fedorahosted.org/fpc/ticket/382
Until things are figured out, this should be installable quite easily with the normal go get tool except for the bug mentioned above.

Roger, thanks for the update.

Just some notes for me here:

Should set Restart=on-failure in the service file
Need to add d /run/cups-connector 0755 gcp gcp - to /usr/lib/tmpfiles.d/cups-connector.conf (/tmp is not the right place for sockets, they don't get cleaned up there)
Definitely need "log_to_journal": true and "monitor_socket_filename": "/run/cups-connector/cups-connector-monitor.sock" in the default config file or the command line

Blocking on #266.

Things are still moving (slowly) in Fedora land.
https://pagure.io/packaging-committee/issue/382
I am not working on this right now but if #266 is resolved I could revisit this.

@agoode there's a bunch of golang packages in fedora 25 now.
$ sudo dnf search golang | wc
1314    6286   85562
Is it possible that that packaging issues have been resolved.  I would be great to see yum support for this.

This is still blocked on #266.

Any progress on getting this package released?

No, I'm not working on this right now.


request.json parsing issue

I'm trying to read in a JSON through curl and the request.json gives me None. I've been looking through the doc and request.json should return what I want, but it doesn't. Any ideas?
from sanic import Sanic, response

app = Sanic()

@app.route('/key-value-store/<key>', methods=['GET','PUT','DELETE'])
async def key_handler(request,key):
    kvs = {}
    if request.method == 'PUT':
        inp = request.json
        print(inp)

app.run(debug=True, host='<IP_ADDRESS>', port=8082)

Command I'm running:
 curl --request PUT --header "Content-Type: application/json" --write-out "%{http_code}\n"--data '{"value": "Distributed Systems"}' http://<IP_ADDRESS>:8082/key-value-store/course1000

OS: ubuntu 18.04
Version v19.03.1

You forgot to add a space between "%{http_code}\n" and --data

Yeah that fixes it, my bad.


IMU Characterization

Hello again :D
I'm trying to use the MTI-3 IMU, but the factory noise and bias values are pretty bad.
It would be nice if you can perform some characterization of the noise & bias leaving the IMU static and studying the measurements.
Let me know if I can somehow help with that.

Thanks for raising this problem.
After all, it is not difficult to collect a long static session data for the MTi-3DK.
From my experience, the factory values and the values obtained by independent Allan variance analysis are often very close.
These values are not ready to be used in for instance visual inertial odometry as they are so small.
A good practice is to inflate these noise std dev values by 10 or even 50 as also mentioned in TUM VI dataset where they "inflated 50 times for white noise and 20 times for bias random walk".
So in the end, it depends very much on your target application and the program implementation.


Create unit tests

I made some changes, please take a look.

All good, please don't commit to main branch next time!


⚠ AsianCinema has degraded performance

In 904c49f, AsianCinema ($ACM) experienced degraded performance:

HTTP code: 200
Response time: 7697 ms

Resolved: AsianCinema performance has improved in 0d02cc2 after 6 minutes.


Should exclude storageProfile on VMSS update command request

az feedback auto-generates most of the information requested below, as of CLI version 2.0.62

Describe the bug

When a VMSS is created using Shared Image Gallery image from a different tenant, any VMSS update operation like az vmss update or az vmss extension add will fail at ARM linked access check. This is because the client CLI use won't have permission in the SIG tenant.
The error message you see will be:
The client has permission to perform action 'Microsoft.Compute/galleries/images/versions/read' on scope '{VMSS or VM resource ID}',
however the current tenant '{customer tenant ID}' is not authorized to access linked subscription '109a5e88-712a-48ae-9078-9ca8b3c81345'.

AKS recently rolled out a change to subset of customers to pilot using SIG image and discovered this issue.
To Reproduce

Create an AKS cluster in Australia / Canada region, in the node resource group (named MC_xxx) there will be a VMSS using SIG image. Try do any az vmss update operation on it, or on the VM instance.
Expected behavior

VMSS update should succeed.
In order to make this scenario work, the update request body should only contain the relevant property changes (not the full VMSS properties body), or at least remove property "properties.virtualMachineProfile.storageProfile".
Environment summary

Additional context

VMSS

cc @arrownj , could be done via support of aux-tenant-id in header?

This piece of code is copied from vmss update. It was added in July. It checks existence of image reference and sets auxiliary subscription so that it won't trigger the permission error. Which version of Azure CLI do you use? Maybe you can try the latest version of Azure CLI, 2.11.0 and see if it still fails.
    aux_subscriptions = None
    # pylint: disable=too-many-boolean-expressions
    if vmss and hasattr(vmss, 'virtual_machine_profile') and vmss.virtual_machine_profile and \
            vmss.virtual_machine_profile.storage_profile and \
            vmss.virtual_machine_profile.storage_profile.image_reference and \
            vmss.virtual_machine_profile.storage_profile.image_reference.id:
        aux_subscriptions = _parse_aux_subscriptions(vmss.virtual_machine_profile.storage_profile.image_reference.id)
    client = _compute_client_factory(cmd.cli_ctx, aux_subscriptions=aux_subscriptions)

@qwordy  setting aux_subscription won't help here  - the SP that invokes the CLI command doesn't have permission to access the image under the aux_subscription so it will still fail (the aux_subscription is an AKS owned prod subscription and the images resources under that subscription is not accessible to anyone other than AKS 1st party SP).

Discuss in internal email. I will give a summary here.

any progress about fix on az vmss extension command?

https://github.com/Azure/azure-cli/pull/14992
PR is ready

found a similar issue on az vmss disk attach/detach command: https://github.com/Azure/azure-cli/issues/15058

Thank you for reporting it.

currently PR in CLI side, while blocked by a VMSS service issue. When service deployment done, will merge CLI side change.


Rule require-hook should allow test.use

Rule require-hook fails for a test.use used at the top level. Per the documentation test.use causes an error within a beforeEach or beforeAll hook (specifically - Error: Playwright Test did not expect test.use() to be called here), so it should be added to the allowed top level expressions in require-hook.

This is already fixed in the latest version.
https://github.com/playwright-community/eslint-plugin-playwright/releases/tag/v1.3.1


[FEATURE] Starting year for leap years calculation

Hi,
I'm currently trying to implement the calendar of the hyborian age (Conan) using a combination of year names and leap years. I nearly got it working as intended but I couldn't get the leap years to align. When you use custom leap years it seems to be assumed that the first leap year in the cycle is not the first year in the calendar, so I'm wondering if there's a way go around this or if this is an option you might consider to include.
Thank you in advance for taking the time to read this.
Example
This is how it works today:
Leap years are configured every 3 years
The first leap year is year 3 and the next is year 6
This is what I'm trying to achieve:
Leap years are configured every 3 years, starting on year 1
The first leap year is year 1 and the next is year 4
Reference
For reference here's the calendar I'm trying to implement:

Export
Here's an export of what I have so far:
https://pastebin.com/9XWPHDBA

Hey sorry about taking so long to get back to you about this.
right now Leap years always start on year 0, I can look at adding an option where you can specify which year leap years start from or use the Year Zero setting for that as well.

No worries, thank you for the reply. Right, if you would consider to add a field/setting to offset the index from 0 to 1 (default being 0) it would account for cases like this.
I'd be more than happy to open a PR with the fully fledged calendar preset for others to use if you decide to implement the feature. As a way of giving back :)

Been a long time but this feature has been added to version 2.4.0.
You can set the Starting Year option under the leap year settings to specify the first year that a leap year happens and all other leap years will flow from that.

I'll open the PR with the Hyborian calendar as soon as I'm done with it. Thanks a lot for the update! 🎉


DocsArchive-<IP_ADDRESS>Auto archive content

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

Docs Build status updates of commit 56a3255:
:clock10: Pending: waiting for processors (7 builds ahead of you)
:warning: Docs Build is busy, currently there are 7 builds ahead of this one, for more information you can view the Build queue graph on the Docs Portal.

Docs Build status updates of commit 56a3255:
:clock10: Pending: waiting for processors (7 builds ahead of you)
:warning: Docs Build is busy, currently there are 7 builds ahead of this one, for more information you can view the Build queue graph on the Docs Portal.

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

File
Status
Preview URL
Details

:x:Error

Details

[Error-GitBranchDeletedOrForcePushed] Cannot sync git repo to specified commit because branch Release_Archive_master_2021-01-29-06-24-12 has been deleted or has been force pushed

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

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

File
Status
Preview URL
Details

:x:Error

Details

[Error-GitBranchDeletedOrForcePushed] Cannot sync git repo to specified commit because branch Release_Archive_master_2021-01-29-06-24-12 has been deleted or has been force pushed

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


json filtering

Json filters are correctly generated, but still do not work at this time.
actual, err := client.User.FindFirst(
	User.Foo.Equals("a"),
	User.Foo.Equals("b"),
).Exec(ctx)

is currently translated to
findFirstUser(where: {
  AND: [
    { foo: "a" },
    { foo: "b" },
  ],
})

In order to fix this, the extra AND-wrapping would need to be removed. However, there should be extra checks to throw a runtime error if the same combination of field+action (e.g. foo + equals are defined twice), as this would be invalid and only the last one would work, so it's better to throw at runtime.


Figure out database cloud architecture

This is a big, complicated issue.
Usually specialized databases are used to store vectors, a vector database. We aren't gonna pay for hosting so that leaves us with the major open-source suspects: Milvus, Weaviate, Qdrant, ChromaDB.
Since we are starting with uploading raw embeddings, we may be able to get away with just storing them in Postgres and using the pgvector extension to search it. However this will get slow after like 10 million rows - and a large document could be turned into many embeddings.
ChromaDB, Qdrant, Milvus all use Docker containers. That raises questions like: do we run the rest of the app in Docker? Do we then run a Nomad cluster (or Kubernetes)? That would be hard to set up - Docker is ephemeral but obviously we want to back up the data. On the other hand it would make horizontal scaling easy.
ChromaDB is brand new, early in development. To persist the database, you run in client-server mode and start up a Docker container. I like the team, they are ideologically aligned, they are US-based.
We will likely start with Milvus. They are incredibly production-ready, with Terraform and Ansible modules ready to deploy their own custom Kubernetes clusters to AWS. I am hopeful we can get a solution up and running soon. And switch to ChromaDB over time.
But first of all we will use Postgres on Supabase to get a demo running.

Resources consulted, among many others:

https://milvus.io/docs/aws.md
https://github.com/chroma-core/chroma/issues
https://qdrant.tech/documentation/quick_start/

Further research:
The first goal is to let a user upload and download data.
Many of the data files I'm finding are Parquet or Pickle files. They aren't like raw CSV files or something. This means they must be read into a vector database before we can search them.
How to do this? We should let a user drag and drop this file. Then we can open it and read it in chunks and send to supabase.
Alternatively, Milvus supports some sort of bulk import and may accept these files natively.
I can try to read it in chunks in JS and then send each chunk (now a big vector) to Supabase. However, more likely I am going to need to send the file straight to a Python API do to that job.
Or, I can set up a Milvus cluster on AWS. Then we could send the files straight to Milvus.
Further, we should also consider storing the files as they are. This again likely means throwing them on to AWS. Each appears to be about 400 Mb, which is not small but also not insanely large (famous last words?).


On Windows pxg wrapper script fails due to incorrect syntax

Describe the bug
running pxg -i after px --init global does not work on Windows
To Reproduce

Be on Windows
Run CMD/Powershell as admin
Be in a folder with .\pw.bat
Run .\pw --init global
Run pxg --info

Expected behavior
I want it not to fail because of wrong CMD syntax
Screenshots

Desktop (please complete the following information):

Python  version: N/A
OS: Windows

Additional context
None

I guess the script fails when your project is in a different drive then your home folder (D vs C).
Will try to reproduce...

I'll have a PR in a few min

Awesome, thanks for the contribution!


Errors don't show in log stream

Internal issue: https://dev.azure.com/azuretracking/Azure tracking/_queries/edit/1703/?triage=true
Also: https://dev.azure.com/azuretracking/Azure tracking/_queries/edit/1723/?triage=true
https://dev.azure.com/azuretracking/Azure tracking/_queries/edit/1713/?triage=true
If you create a JS function that throws (adding "throw 'error';" in the code for example) and try to stream logs with the command "func azure functionapp logstream " no logs at all are displayed when executing the function.
/cc @sinedied

@mhoeger please take a look at this. It's being flagged as a P1 in Node end to end review.

Primary goal here is for investigation. We need to identify the issue so we can scope and potentially commit to sprint.

Unable to repro this

Where this is my code:
module.exports = async function (context, req) {
    context.log('JavaScript HTTP trigger function processed a request.');
    context.log(process.version);
    if (req.query.error) {
        throw "error";
    }
}

Unable to repro this

Where this is my code:
module.exports = async function (context, req) {
    context.log('JavaScript HTTP trigger function processed a request.');
    context.log(process.version);
    if (req.query.error) {
        throw "error";
    }
}

@sinedied - sorry for the late response on this by the way! I've tried deploying to a Linux Dedicated app as well and still was unable to repro. Can you give me some more details on when you ran into this behavior? And if you did something like the code above, was it just the failed executions that weren't showing up? Some helpful information would be: core tools version you used and the name of your app and a rough timeframe of when you ran into this issue. You can share your function app name either directly or indirectly. Thanks!

@sinedied - sorry for the late response on this by the way! I've tried deploying to a Linux Dedicated app as well and still was unable to repro. Can you give me some more details on when you ran into this behavior? And if you did something like the code above, was it just the failed executions that weren't showing up? Some helpful information would be: core tools version you used and the name of your app and a rough timeframe of when you ran into this issue. You can share your function app name either directly or indirectly. Thanks!

I don't have the Function App deployed anymore, but I'll try to roll up a new one and give you all the details to reproduce. The core tools version I had installed was 3.0.2996, using Node.js v12. The stack trace you show is what I could get using VS Code or the Portal, but using the CLI strangely all I got what nothing.
I'll test again on my current env, then retry with latest core tools/Node.js version and let you know the results.

I don't have the Function App deployed anymore, but I'll try to roll up a new one and give you all the details to reproduce. The core tools version I had installed was 3.0.2996, using Node.js v12. The stack trace you show is what I could get using VS Code or the Portal, but using the CLI strangely all I got what nothing.
I'll test again on my current env, then retry with latest core tools/Node.js version and let you know the results.

Thank you @sinedied !

Thank you @sinedied !

@mhoeger I tried publishing the same project I used when I raised this issue, on a new azure function (both windows and linux, Node.js v12 and v14) and could not reproduce the issue I had before, but had some mixed results though.
My process was always the same:

Use the same functions projects I used for E2E reviews, no code change
Create a new function app with a new resource group (sometimes on the portal, sometimes on the CLI)
Deploy through the CLI

One worrying thing is that I experienced some "flakyness" with the platform (out of 5 tries):

On one instance, when deploying with the func CLI the first time the project on a Linux/Node v12 it succeeded without an error, though no function was actually deployed. It worked then when redeploying with the exact same command the second time
On one instance, I could never see any logs in the browser portal (--browser option) with a linux instance. Trying again 3 days later, it worked on first try.
On one instance, deployment got stuck, I killed it and then it kept throwing errors when I tried again for at least an hour (then I went on). And it worked when I tried again the next day.

When I reported the log issue, I tried a few times running the CLI command (at least 3 I as recall) and could never see the logs.
So far it seems I'm unable to find a replication scenario for this particular issue (I promise I won't trash the function app next time I find an issue like this 😉 ), so this could probably be closed.
Though it might be worth opening a lower-priority issue to investigate the "flakyness" (I lack a better word for this), as I suspect the original log stream issue I had was an instance of that. FWIW, when I ran workshops using Functions, every time we had some random issues like this. As I tried to rule out some possible environment issues, I experienced some of the issues on my own machine that went and go over time, while working perfectly fine most of the time, so I'm not sure what's going on here (cc @anthonychu).
Sorry for the long post and not being able to help much here

@mhoeger I tried publishing the same project I used when I raised this issue, on a new azure function (both windows and linux, Node.js v12 and v14) and could not reproduce the issue I had before, but had some mixed results though.
My process was always the same:

Use the same functions projects I used for E2E reviews, no code change
Create a new function app with a new resource group (sometimes on the portal, sometimes on the CLI)
Deploy through the CLI

One worrying thing is that I experienced some "flakyness" with the platform (out of 5 tries):

On one instance, when deploying with the func CLI the first time the project on a Linux/Node v12 it succeeded without an error, though no function was actually deployed. It worked then when redeploying with the exact same command the second time
On one instance, I could never see any logs in the browser portal (--browser option) with a linux instance. Trying again 3 days later, it worked on first try.
On one instance, deployment got stuck, I killed it and then it kept throwing errors when I tried again for at least an hour (then I went on). And it worked when I tried again the next day.

When I reported the log issue, I tried a few times running the CLI command (at least 3 I as recall) and could never see the logs.
So far it seems I'm unable to find a replication scenario for this particular issue (I promise I won't trash the function app next time I find an issue like this 😉 ), so this could probably be closed.
Though it might be worth opening a lower-priority issue to investigate the "flakyness" (I lack a better word for this), as I suspect the original log stream issue I had was an instance of that. FWIW, when I ran workshops using Functions, every time we had some random issues like this. As I tried to rule out some possible environment issues, I experienced some of the issues on my own machine that went and go over time, while working perfectly fine most of the time, so I'm not sure what's going on here (cc @anthonychu).
Sorry for the long post and not being able to help much here

Thanks for trying and for the extra details @sinedied! I'm going to close this particular issue, but please do file issues and tag folks with more specific details for some of these scenarios. There appear to be a variety of issues that may need investigating individually.
One thing that I think will help significantly is @Francisco-Gamino and @madelinegordon 's work to have daily automated E2E tests of core scenarios like this (create function app, deploy, test). Adding them here mainly as FYI, but also to alert them that this flakiness is an issue. For example, instead of running E2E tests just once per day with a given build, perhaps few could run multiple of the same e2e scenario of deploy and test in parallel to try to catch flakiness?

Thanks for trying and for the extra details @sinedied! I'm going to close this particular issue, but please do file issues and tag folks with more specific details for some of these scenarios. There appear to be a variety of issues that may need investigating individually.
One thing that I think will help significantly is @Francisco-Gamino and @madelinegordon 's work to have daily automated E2E tests of core scenarios like this (create function app, deploy, test). Adding them here mainly as FYI, but also to alert them that this flakiness is an issue. For example, instead of running E2E tests just once per day with a given build, perhaps few could run multiple of the same e2e scenario of deploy and test in parallel to try to catch flakiness?


Discussion: Propagation of event payload to next stage

Currently, the event payload of a task sequence is propagated through all stages meaning that the result of a task in one stage is visible in the next stage. Hence, when the next stage has not an identical task, the payload will not be overridden. For example, if a production stage does not perform an evaluation, the  evaluation result from the previous stage is visible.
Option A: Just propagate a configurationChange to the next stage and remove the rest.

Advantage: Clear separation of stages
Disadvantage: If a task requires a payload from the previous stage, it does not get it.

Option B: Propagate the entire payload through all stages.

Disadvantage: It can be misleading (or even unclear) from which stage, e.g., the evaluation result is coming from.

This situation needs to be discussed.

Another topic for discussion is the current concept of accumulating event data:
Currently, the data of cloud events get accumulated/enriched by data from previous tasks to make sure that the next tasks have access to the information they eventually need from already completed tasks. The benefit is, that the "event trace" is encoded in the current cloud event and services do not need to make an explicit lookup in the database. However, this information is stored as top level data right below the .data block. Hence, this data can easily be overwritten by any service, by accident (e.g., when any field name matches with the field name the service is using). Thus, it's worth considering putting the accumulated event information in a separeate block of the cloud event. (e.g., keptn-event-trace, or keptn-history,...). The only restriction is, that no service can use fields with this name as event payloads. Having this, it would be clear, why this information is present in the cloud events (currently it is not, and you can just guess which information might be relevant for any service and which is not). Further, we would avoid the risk of services overwriting important event trace information.
What are your thoughts on this?
@agrimmer @johannes-b  @ermin-muratovic @Kirdock @bacherfl @christian-kreuzberger-dtx

I don't like the concept of accumulating event data, because you can not say from which service the data block was written and additionally as @warber said it can be overwritten by any service. I know that this would change a lot, but I would prefer a separate response or trace block, which contains only the response of that one service that executed that event or if it really is necessary, then a responses or traces block with the accumulated event information.


Compile with -autofree

Just a reminder to compile vls with -autofree whenever there are new changes to the autofree engine aspect of the compiler. Compiling it with -autofree right now causes C errors.

As of https://github.com/vlang/v/commit/fafb035fb523fcb3105e112e1142a640b7f21b44

Closed. The default memory management, Boehm GC, is now used by default.


Missing the results file download option

On the linking page, you used to be able to download the match result csv and now you can't.

@sinairusinek please do a new matching and see that the matching result is now saved.


Restrict DX run height adjustment to only relevant glyph AND Correct PTY rendering on trailing half of fullwidth glyphs

Summary of the Pull Request

Height adjustment of a glyph is now restricted to itself in the DX
renderer instead of applying to the entire run
ConPTY compensates for drawing the right half of a fullwidth
character. The entire render base has this behavior restored now as
well.

PR Checklist

[x] Closes #2191
[x] I work here
[x] Tests added/passed
[x] No doc
[x] Am core contributor.

Detailed Description of the Pull Request / Additional comments
Two issues:

On the DirectX renderer side, when confronted with shrinking a glyph,
the correction code would apply the shrunken size to the entire run, not
just the potentially individual glyph that needed to be reduced in size.
Unfortunately while adjusting the horizontal X width can be done for
each glyph in a run, the vertical Y height has to be adjusted for an
entire run. So the solution here was to split the individual glyph
needing shrinking out of the run into its own run so it can be shrunk.
On the ConPTY side, there was a long standing TODO that was never
completed to deal with a request to draw only the right half of a
two-column character. This meant that when encountering a request for
the right half only, we would transmit the entire full character to be
drawn, left and right halves, struck over the right half position. Now
we correct the cursor back a position (if space) and draw it out so the
right half is struck over where we believe the right half should be (and
the left half is updated as well as a consequence, which should be OK.)

The reason this happens right now is because despite VIM only updating
two cells in the buffer, the differential drawing calculation in the
ConPTY is very simplistic and intersects only rectangles. This means
from the top left most character drawn down to the row/col cursor count
indicator in vim's modeline are redrawn with each character typed. This
catches the line below the edited line in the typing and refreshes it.
But incorrectly.
We need to address making ConPTY smarter about what it draws
incrementally as it's clearly way too chatty. But I plan to do that with
some of the structures I will be creating to solve #778.
Validation Steps Performed

Ran the scenario listed in #2191 in vim in the Terminal
Added unit tests similar to examples given around glyph/text mapping
in runs from Microsoft community page

I've kicked the x64 build to restart only that leg.

@msftbot merge in -1 minutes


iOS privacy manifest required for several plugins

Plugin
Various
Use case
Several of this project's plugins are listed on on https://developer.apple.com/support/third-party-SDK-requirements/ as requiring a privacy manifest:

connectivity_plus
device_info_plus
package_info_plus
share_plus

See https://github.com/flutter/flutter/issues/131940 for context, but some kind of action will need to be taken.
If you've had any communication from Apple about what the expectations are for the plugins in terms of describing usage, that may be helpful as we work to understand the overall ecosystem impacts here.
Proposal
Add privacy manifests, and/or clarify with Apple about whether these plugins should actually be on the list.

@stuartmorgan  does this affects me if I'm planning on using this plugin for developing an ios app? if yes, what workaround do you suggest?

Hello!
What is the status of the response to this matter?
You may need an empty manifest even if you are not collecting anything 😭
https://github.com/flutter/flutter/issues/131940#issuecomment-1881641272
If an empty manifest is ok I may be able to create a PR for you too.

My app  uses share_plus . There is a possibility of being rejected in the App Store review next spring.
Can someone please tell me what privacy information it is accessing?

Interesting that some of them are listed, but not all of them. I guess due to popularity.
Ideally, we will want to do this for all plugins, not only the ones listed.
This PR from the Flutter team could be a good starting template for this: https://github.com/flutter/packages/pull/5846
My understanding is that, since the plugins don't collect any data/send it anywhere, an empty manifest would be enough. Anyone else thinks the same?

I am taking care of this, will open a separate PR per plugin.

My understanding is that, since the plugins don't collect any data/send it anywhere, an empty manifest would be enough. Anyone else thinks the same?

If any of the plugins in this repository use a Required Reason API, that would require a non-empty manifest even if the plugin doesn't have any data use to declare.

Thanks @stuartmorgan
Looking at the Flutter repo, the only plugin that used a Required Reason API was the shared_preferences, since it uses UserDefaults.
Taking a quick look over the Required Reason API, I couldn't find any that is used here in the plus plugins:

UIDevice which is used in device_info_plus seems ok.
Same for the network APIs used for network_info_plus.

In case we need to correct this in the future, the manifests will be in place, and can be updated accordingly.

Privacy info has been added to all plugins.

There is some info regarding upcoming releases here: https://github.com/fluttercommunity/plus_plugins/issues/2653


Escape paths

If the paths contain special characters, the commands would break. In my case it was an iCloud path that has a space in it.

line 15, there was no space after the -r.
line 185, the printf I believe does exactly the same as DovishMove, also the latter is used 9 lines above it.

Thanks!!


Remove all OAM related code

Notes for Reviewers
The place where OAM word would still be left after this PR is in the gRPC call ProcessOAM.
Fixes #7434
Signed commits

[ ] Yes, I signed my commits.

Codecov Report
Patch coverage has no change and project coverage change: +0.18 :tada:

Comparison is base (23f8141) 16.12% compared to head (e1757c2) 16.30%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7493      +/-   ##
==========================================
+ Coverage   16.12%   16.30%   +0.18%
==========================================
  Files         119      119
  Lines       16633    16443     -190
==========================================
- Hits         2682     2681       -1
+ Misses      13464    13275     -189
  Partials      487      487

Flag
Coverage Δ

gointegrationtests
5.66% <0.00%> (+0.05%)
:arrow_up:

unittests
12.12% <0.00%> (+0.13%)
:arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files
Coverage Δ

server/cmd/main.go
0.00% <ø> (ø)

server/handlers/design_engine_handler.go
0.00% <0.00%> (ø)

server/handlers/k8sconfig_handler.go
2.06% <ø> (+0.19%)
:arrow_up:

server/handlers/meshery_application_handler.go
0.00% <0.00%> (ø)

server/handlers/middlewares.go
0.00% <0.00%> (ø)

server/router/server.go
0.00% <ø> (ø)

... and 1 file with indirect coverage changes
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

@Abhishek-kumar09 you might be able to help with these conflicts.


Add Terra.do to education.md list of resources

@lrennels
I like the work of Terra.do very much, but so far I can't find any documents which are under free license. According to the Contribution Guide this is mandatory to be listed here.
What I find much more interesting are the projects you work on yourself:
https://github.com/fund-model/MimiFUND.jl
https://github.com/openmodels/MimiPAGE2020.jl
Great job. You should add those!

Ah that makes a lot of sense! @Ly0n I could add Mimi, which is the home of those projects and you might be interested, mimiframework.org !  I'm working for Terra adding a software course for them, so we may be in touch.


Support helm.sh/images as annotation to list Helm chart images

Is your feature request related to a problem? Please describe.
Trying to create an images lock will not produce the expected result if the annotation used to list the Helm chart images is different from images. This goes against HIP-0015, which establishes the annotation helm.sh/images as a future standard.
Describe the solution you'd like
For dt to support the usage of any of the two images or helm.sh/images annotations.
Describe alternatives you've considered
Using the currently supported images annotation works as expected but it would be preferable to be able to use helm.sh/images as defined by HIPs.
Additional context
No response

Hey @FraPazGal . Have you tried with the --annotations-key flag?

That works perfectly, thanks for the help @mpermar!


Pod mount to PV issue that Trident created

My customer has a K8s cluster and the versions are Client: v1.16.0, Server: v1.15.3.
root # kubectl version
Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.0", GitCommit:"2bd9643cee5b3b3a5ecbd3af49d09018f0773c77", GitTreeState:"clean", BuildDate:"2019-09-18T14:27:17Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.3", GitCommit:"2d3c76f9091b6bec110a5e63777c332469e0cba2", GitTreeState:"clean", BuildDate:"2019-08-19T11:05:50Z", GoVersion:"go1.12.9", Compiler:"gc", Platform:"linux/amd64"}

Now, the customer is trying to validate Trident v19.07 operations. Followed NetApp trident guide for creating basic backend, storageclass and pvc. Those were created well. However, when the customer tried to mount PV to a POD, got an issue with below log.
root # kubectl describe pod task-sri-pv-pod2
Name:         task-sri-pv-pod2
Namespace:    default
Priority:     0
Node:         sid-kube-node3/<IP_ADDRESS>
Start Time:   Thu, 17 Oct 2019 18:02:58 +0900
Labels:       <none>
Annotations:  <none>
Status:       Pending
....
Events:
 Type     Reason                  Age                   From                     Message
 ----     ------                  ----                  ----                     -------
 Normal   Scheduled               6m32s                 default-scheduler        Successfully assigned default/task-sri-pv-pod2 to sid-kube-node3
 Normal   SuccessfulAttachVolume  6m32s                 attachdetach-controller  AttachVolume.Attach succeeded for volume "pvc-7874c8c1-3316-4df9-8c1f-dd021c12070d"
 Warning  FailedMount             4m29s                 kubelet, sid-kube-node3  Unable to attach or mount volumes: unmounted volumes=[task-pv-storage], unattached volumes=[task-pv-storage default-token-rkfvd]: timed out waiting for the condition
 Warning  FailedMount             2m12s                 kubelet, sid-kube-node3  Unable to attach or mount volumes: unmounted volumes=[task-pv-storage], unattached volumes=[default-token-rkfvd task-pv-storage]: timed out waiting for the condition
 Warning  FailedMount             11s (x11 over 6m24s)  kubelet, sid-kube-node3  MountVolume.NewMounter initialization failed for volume "pvc-7874c8c1-3316-4df9-8c1f-dd021c12070d" : volume mode "Persistent" not supported by driver csi.trident.netapp.io (only supports [])

Can anyone investigate the issue?

Please have the customer open a case. GitHub isn't a good venue for troubleshooting.


Added a readme with a command line example how to use it

I wondered how to use this from the CLI so I found @tjvantoll's helpful article and figure I'd share it.
Thanks for considering merging this,
Eddy

Thanks Eddy! You can actually use just --ts now for this one. I’ll go ahead and merge this in and update 😄

That's fantastic since I can never remember this template name for some reason 👍  👍

Apparently it’s --tsc, so I guess I remember things very badly as well. Just updated the README. Thanks again!