AffineGridGen not used

Hi @sergeywong,
While AffineGridGen is defined in the networks module, it is not used anywhere for affine warping. How can we incorporate this into TpsGridGen (TPS)?
Where would we need to make the changes in init and forward?

@solitarysandman why is this issue closed?

I solved it by tweaking the code using pytorch ST networks tutorials as guide:
https://pytorch.org/tutorials/intermediate/spatial_transformer_tutorial.html

Changes are as follows:

Change output_dim in Feature Regression to 6, because affine has 6 parameters of the shape (2,3)
Convert these 6 outputs to the shape of (2,3)
Use theta created in step 2 to run affinegridgen to obtain grid
Use grid_sample as before to get warped results

@solitarysandman Sorry if it's a dumb question, but why we need to generate grid through affinegridgen rather than Tpsgridgen?


CR field for default channel

Fixes #23
Proposed Changes

New CR field for default channel template
Defaults to InMemoryChannel
Did some refactoring in brokerclass defaults code to share code with channel defaults

Release Note

It is now possible to set the default channel template within KnativeEventing CR with `defaultChannelTemplate` field. Defaults to `messaging.knative.dev/v1beta InMemoryChannel`.

Test instructions
Apply following:
apiVersion: operator.knative.dev/v1alpha1
kind: KnativeEventing
metadata:
  name: knative-eventing
  namespace: knative-eventing
spec:
  defaultChannelTemplate:
    apiVersion: messaging.knative.dev/v1alpha1
    kind: KafkaChannel
    spec:
      numPartitions: 10
      replicationFactor: 1

Check default-ch-webhook configmap.
You should see
data:
  default-ch-config: |
    clusterDefault:
      apiVersion: messaging.knative.dev/v1alpha1
      kind: KafkaChannel

/hold
Let's keep this on hold until because of the discussion at https://github.com/knative/docs/pull/2597

/close
As we have a generic Config field in CRs that allows us to set upstream configmaps, there's no need to have the field introduced in this PR.
See the discussion here: https://knative.slack.com/archives/CEPGNPHP1/p1592486833471600


CPP tests

The following tests need to be improved:

[ ] test_energy_storage_device does not test ParallelRC (only SerialRC is tested)
[ ] test_ragone_chart does not test discharge with constant_load, discharge with constant_current and SeriesRC, discharge with constant_power and SeriesRC

The following functions need to be tested:

[x] in deal.II/geometry.templates.h: foo<3>
[ ] in deal.II/post_processor.cc: extract_duration_and_average_power
[ ] in deal.II/post_processor.templates.h:

[ ] get(std::string const &key)
[ ] get_vector_keys()
[ ] check that the debug quantities and the debug solution are needed or if they can be removed. They are not currently tested.

[ ] in deal.II/supercapacitor.cc: no test in 3D
[ ] in deal.II/supercapacitor.h: SuperCapacitorInspector
[ ] in resistor_capacitor.cc:

[ ] reset x2
[ ] evolve_one_time_step_linear_current x2
[ ] evolve_one_time_step_linear_power x2
[ ] evolve_one_time_step_linear_power x2

foo has been removed in the distributed branch.

This is a test.

test_energy_storage_device fixed by #123

extract_duration_and_average_power removed by #131

PR #148 fixed test_ragone_chart

PR #160 fixed test_resistor_capacitor-2

PR #168 removed reset

PR #180 added a 3D test.


a11y: fix some color contrast issues

Description
This changes the color of some elements to conform to better contrast rules. It also splits the bot language from the bot name up in the header, as per design suggestion.
Task Item
closes #6463
Screenshots

Coverage decreased (-0.005%) to 52.715% when pulling 3faeb6e97af0796296c6c55ea4c75fe09478bcfd on beyackle/colorContrast into 294514fbf2a5a3b5110889bd4f4dba04567c90d0 on main.


issue #315 remove hard dependency on openwhisk folder in shared mode

allows you to use shared mode even when cloning into different directories than "openwhisk"

Did you check if any of the documented steps in the readme need to be adjusted?

@rabbah yes. the readme still applies as it suggests to run git clone with no directory param, hence always creating an "openwhisk" directory. the PR just gives you the freedom to choose another dir to clone into.

Rebased and merged as a53ef89.


In windows the pause/stop fit option is greyed out once fit is started

Once a fit is started it cannot be actively stopped. For some reason in windows, the pause fit option is greyed out. I have yet to be able to try this on linux to check if this is the case here as well.

Yeah, this is an artifact of the current threading methodology (which is under investigation to enable this in future). As a short term fix, do you think it would be a better UI if instead of the pause logo and it reading "fitting in progress", there should be a spinner (like this https://fontawesome.com/v5.15/icons/spinner?style=solid) to indicate that it is in progress?

In easyDiffraction, an animated message "Fitting in progress..." is displayed in the status bar (bottom right corner) to indicate that fitting is in progress.

I believe that is the case in easyReflectometry also (https://github.com/easyScience/easyReflectometryApp/blob/48f18dd63f6f3bbc3ad87d5460925a3b6770ae4a/easyReflectometryApp/Gui/Pages/Analysis/SideBarBasic.qml#L195). However, I think the pause-circle glyph is potentially confusing.

No, this animated message "Fitting in progress..." is implemented based on the RunningLabel.qml element from easyApp, which was not available in easyAppGui. So, this is yet another reason to switch from the old easyAppGui and easyAppLogic to the new easyApp as early as possible (Issue #19).
Meanwhile, if the pause-circle glyph is confusing, I'd suggest simply disabling the Start fitting button on click, without changing its text and icon, until the pause/stop function is implemented (See PR #36).

Not quite resolved with #36, however a short term solution has been implemented.

@AndrewSazonov or @rozyczko is it now possible in easyDiffraction to pause/stop the fitting process?

fit thread cancellation was implemented and worked fine on windows but not on macos. There's a bug in macos version of Qt which makes thread stopping affect the main thread and make it unstable.
I think we decided to wait for qt to fix their issue.
Maybe we can try it with Qt6 at some point?


Installing issue

This is  a bug | feature request.

Prerequisites

[ x] Are you running the latest version?
[x ] Are you reporting to the correct repository?
(enso is made of many specialized packages: https://github.com/laravel-enso)
[x ] Did you check the documentation?
[x ] Did you perform a cursory search?

Description

i ran npm install and got this
<EMAIL_ADDRESS>requires a peer of<EMAIL_ADDRESS>but none is installed. You must install peer dependencies yourself.
check package.json and webpack version should be the 3, am i doing something wrong?
Steps to Reproduce

Download the project with git clone https://github.com/laravel-enso/Enso.git
Run in the project folder composer install
Configure the .env file. Run php artisan key:generate
Run php artisan migrate --seed
npm install
Actual behavior

then runing enso

I'll release v3.3.0 today or tomorrow, if you'll still encounter problems reopen this issue


Imported game shortcuts crash Steam

As the title suggests, after I import all my Epic and GOG games into Steam, when I go to my library the whole program outright crashes. The only solution is to manually go in the launcher's installation folder and deleting all its files to let it reinstall (in terms deleting all the shortcuts).

I am having a similar issue. Although my steam is not crashing outright, BoilR makes big picture mode launch into an empty blue screen.
Renaming the userdata/{id}/config/shortcuts.vdf to .vdf_bak makes big picture mode launch again (but of course with no shortcuts).
Tried reinstalling steam and let BoilR create the shortcuts.vdf file from scratch several times but it did not help.
Happy to provide more info/logs if you need them. I had a look inside shortcuts.vdf but did not see anything strange.

Update: I just tried it again and this time it worked without me changing anything, after not working many times in a row.
So, issue solved for me.


Request

All English in components and demo
Component  all demo to support Android specially component DEMO.
could not find FMXCalendarControl1.SetMonthNames(TEnMonths);
SetMonthNames on object inspector;
Opacity is 1. cannot change. cannot see days.
With all do respect to Chines English pls.

send me a demo to show the problems


git diff on a merge conflict fails with an error from nbdev_clean_nbs script

When running git diff from a terminal inside Jupyter Notebook (or rather JupyterLab) when there is a merge conflict in the repository, I get the following error from nbdev_clean_nbs called from textconv diff filter:
$ git diff
[...]
Traceback (most recent call last):
  File "c:\programdata\anaconda3\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\programdata\anaconda3\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\ProgramData\Anaconda3\Scripts\nbdev_clean_nbs.exe\__main__.py", line 7, in <module>
  File "c:\programdata\anaconda3\lib\site-packages\fastcore\script.py", line 103, in _f
    tfunc(**merge(args, args_from_prog(func, xtra)))
  File "c:\programdata\anaconda3\lib\site-packages\nbdev\clean.py", line 86, in nbdev_clean_nbs
    nb = json.load(open(f, 'r', encoding='utf-8'))
  File "c:\programdata\anaconda3\lib\json\__init__.py", line 293, in load
    return loads(fp.read(),
  File "c:\programdata\anaconda3\lib\json\__init__.py", line 357, in loads
    return _default_decoder.decode(s)
  File "c:\programdata\anaconda3\lib\json\decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "c:\programdata\anaconda3\lib\json\decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 108 column 1 (char 4184)
fatal: unable to read files to diff

The nbdev_clean_nbs is called by gitattributes mechanism, see .gitconfig entry:
[diff "ipynb"]
        textconv = nbdev_clean_nbs --disp True --fname

I can't tell for sure it's the same thing, but i think I got into trouble with this before, because of the way git deals with merge conflicts, it does this to files:
<<<<<<>>>>>> branch-a

Which breaks the ipynb file json - making it impossible for nbdev to read the ipynb file. The only solution is to fix it manually in a text editor to make sure the json is valid again.

Why do it manually, if it can be done automatically using the diff/merge driver mechanism?
nbdev should in my opinion provide a merge driver in addition to textconv driver it provides, something like the git-json-merge (in JavaScript) or git-merge-drivers (in C++), but in Python:
Then it would be enough to add the following to .gitconfig created by the nbdev_install_git_hooks command:
[merge "json"]
    name = custom merge driver for json files
    driver = git-json-merge %A %O %B

And the following line to .gitattributes:
**/*.ipynb merge=json

Yes! This would be a much better solution!

@jnareb can you educate me a bit mroe on how the git merge driver works from a user interface perspective?
Doesn't the user still have to choose which version of the code needs to be favored in the conflict manually?

@hamelsmu :  a custom merge-driver in Git affects how three versions of a file are merged when a file-level merge is necessary during git merge, and other commands such as git revert and git cherry-pick.
You need to configure *.ipynb files to use custom merge driver in the .gitattribute file, for example:
**/*.ipynb merge=ipynb

Then define the custom merge driver in the config, in the .gitconfig file, for example:
[merge "ipynb"]
    name = custom merge driver for Jupyter Notebooks
    driver = nbdev_merge_driver %A %O %B

The %A, %O and %B in the above configuration are placeholders which are replaced with the names of temporary files when Git invokes the custom merge driver.

%O is the ancestor version (merge base)
%A is the current version (ours)
%B is the merged version (theirs)

The merge driver is expected to leave the result of the merge in the file named with %A by overwriting it, and exit with zero status if it managed to merge them cleanly, or non-zero if there were conflicts.
Additional placeholders exists:

 %L is the conflict marker size (i.e. the number of characters in <<<<<<<, ======= and >>>>>>>)
%P is the pathname in which the merged result will be stored (e.g. when renames).

Let's assume that the base version looks like this:
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "- foo\n",
    "- bar\n",
    "- baz"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}

Let's assume that on main branch we have added the Markdown cell, and now the notebook looks like this:
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "- foo\n",
    "- bar\n",
    "- baz"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "- quux"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}

The other side also added the Markdown cell, but with different contents:
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "- foo\n",
    "- bar\n",
    "- baz"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Hello world!"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}

The default built-in text merge driver (as opposed to built-in binary merge driver, which saves our version without any merge markers or any attempts at merging, and mark files as conflicted) adds conflict markers, that creates the following file - which is not a valid *.ipynb file:
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "- foo\n",
    "- bar\n",
    "- baz"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
<<<<<<>>>>>> side
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}

The custom merge driver could try to put merge markers inside cells, and not outside of them. I have not checked how for example git-json-merge or nbdime does it, but for this example the result could look like this, with conflict markers inside cell:
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "- foo\n",
    "- bar\n",
    "- baz"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "<<<<<<>>>>>> side"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}

Perhaps it would be a good idea to add some tags to mark the conflict area explicitly.

However, I don't currently have no idea what to do if there were some cells added, or one side added Markdown cell, and the other side added code cell, which currently results in the following merge result - which is not a valid Jupyter Notebook
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "- foo\n",
    "- bar\n",
    "- baz"
   ]
  },
  {
<<<<<<>>>>>> side
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}

One simple solution could be for nbdev_clean_nbs to print a warning and exit when encountering invalid *.ipynb file, instead of crashing.

The custom merge driver that nbdime provides, namely git-nbmergedriver, configured in the following way:
[merge "jupyternotebook"]
        driver = git-nbmergedriver merge %O %A %B %L %P
        name = jupyter notebook merge driver

(there is also a full-fledged custom diff driver provided by nbdime, namely git-nbdiffdriver), produces the following merge result, with conflict markers as separate Markdown cells:
{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "- foo\n",
    "- bar\n",
    "- baz"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**<<<<<<< local**"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "- quux"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**=======**"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Hello world!"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "**>>>>>>> remote**"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}

This is for the case in the next previous comment. It is admittedly a more generic solution, as it works even when one side added Markdown cell and the other added code cell.

As a user, i think nbdime as a default merge driver / tool would be ideal to have in nbdev

We already have that. It's called nbdev_fix_merge. It's not actually set up to integrate directly with git (although that would be nice to add) - for now you just have to call it manually.

I totally missed that nbdev_fix_merge existed, thanks!

If I'm understanding the above conversation this issue should be closed as it seems nbdev_fix_merge is the solution to the issue raised.     Going ahead and closing this

Using nbdev_fix_merge is a solution to a problem, but not to the issue of bad user experience! In my opinion CLI tools should never crash but rather show an error message (in addition to failing gracefully), especially if the problem is not something exceptional. Tools that are run automatically should not crash in particular.
Does pip crash when given unexpected command, or when there is no Internet connection?
Therefore I don't think this issue is solved, and I think that it should be reopened.
The proper solution would, in my opinion, be the following:

fail gracefully: when given unexpected input the nbdev_clean_nbs CLI tool should show an error message, and simply do not clean the notebook, and do not return error code, or crash - this would allow git diff to proceed, even if with degraded results (spurious changes)
advise user: when given unexpected input and detecting Git merge conflict, nbdev_clean_nbs should advise user in a warning to use nbdev_fix_merge (or install 'nbdime')

In the future perhaps nbdev should install merge driver (nbdev_fix_merge could possibly be repurposed to do this) and perhaps also diff driver (in addition to textconv diff driver), or suggest installing 'nbdime' in the documentation. This way merge conflicts would be handled automatically.

Ok thanks for explaining I'll let @jph00 comment (and possibly reopen)


[BEAM-13647] Remove legacy Go Worker artifact name check

In #16729, we moved to using the RoleUrn for the Go Worker Binary, with the intent of removing the legacy check after a few sprints. That should be safe now.
Fixes #21459

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

[x] Choose reviewer(s) and mention them in a comment (R: @username).
[ ] Add a link to the appropriate issue in your description, if applicable. This will automatically link the pull request to the issue.
[ ] Update CHANGES.md with noteworthy changes.
[x] If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)

See CI.md for more information about GitHub Actions CI.

Can one of the admins verify this patch?

Can one of the admins verify this patch?

R: @lostluck since you have the most context - anything I'm missing here that makes this unsafe?

 Any idea what's going on here/why this isn't safe to remove? I'll close for now


docs: Add user guide for Delete a stream feature

Automated message from Dropbox CLA bot
@synicalsyntax, it looks like you've already signed the Dropbox CLA. Thanks!

Merged, thanks, @synicalsyntax !


feat(common): add mongodb as database support

Closing this as stale for now -- if you're still interested, do feel free to rebase and reopen.


Enable babel-plugin-transform-react-jsx-source in development for better warning messages

In Create React App, we enable babel-plugin-transform-react-jsx-source in development configuration. I would suggest you to do the same.
It must only be enabled in development (since it produces bigger bundles). When it is enabled, React warnings get component stack traces with exact line numbers.
Example before:

Example after:

Hope you find this useful!

I don't currently have time to make a pull request for this, but if anyone wants to add this feature either locally or contribute then this seems to work ok:
npm install --save-dev babel-plugin-transform-react-jsx-source
and modifying the webpack rule for babel-loader as below:
module: {
            rules: [
                { test: /\.tsx?$/, include: /ClientApp/, use: { loader: 'babel-loader', options: { "plugins": isDevBuild ? ["transform-react-jsx-source"] : [] } } },
                { test: /\.tsx?$/, include: /ClientApp/, use: 'awesome-typescript-loader?silent=true' }
            ]
        },

Addtionally wondering if we shouldn't be setting cacheDirectory: true in the babel options. Theoretically improves compilation times, but I don't know enough about this template to be sure it won't cause probs.

ok decided to man up, pull request incoming :) The cache does speed up the build by 30-40%.

We use cacheDirectory: true in babel-loader options in CRA and it works great.

That might have been where I got the idea from ;)

Thanks for the suggestion. Since @DanHarman is implementing this in #749, I'll close this one.
BTW @gaearon thanks for the wonderful work on Redux. I especially like the docs - really easy and fun to read through.

@gaearon Do you know if there's some way to make babel-plugin-transform-react-jsx-source work with source maps, or some other equivalent Webpack loader that supports compile-to-JS languages such as TypeScript?
From what I can tell, if we include babel-plugin-transform-react-jsx-source as-is in the Webpack config, it does add line numbers to warnings, but they are the wrong line numbers because (presumably) they refer to some intermediate .jsx representation of the source, not the original .tsx files.

Oh, I see. It uses information as provided by Babel. I don’t know about how TS and Babel interaction is set up so I can’t really answer that.

OK, thanks for the info! I'll see whether anyone else knows if there's a way to get the original line numbers to flow through somehow. If not, I guess we'd have to just not add this change.

Maybe @hzoo could say whether there’s a any way to tell Babel to infer the original location information from a TS sourcemap (or something like this) or not.

I don't think we do anything special with sourcemaps other than use the source-map package.
The location that is referenced ^ is just from the AST passed into Babel that is reading the JSX. I don't think it has to do with sourcemaps because the Babel plugin runs on the source code itself. I believe we'd need to support TS in babylon for this feature

We'd either have to have Babylon take the input sourcemap into account, or we'd have parse and then iterate over the AST afterward in babel-core to adjust the positions. I don't think there's anything technically blocking that, but we do not do that right now.

Thanks for the info! If this gets implemented one day, we will change the templates to take advantage of it. In the meantime we'll leave things as-is.


Update ADVI interface to match AdvancedVI.jl

This PR updates the internals of Turing to match the rebooted AdvancedVI.jl.
Breaking? Changes
The only change from the previous interface is that I propose to move the number of iterations from ADVI to vi.
That is, change
vi(model, ADVI(n_iter, n_mc), q)

to
vi(model, ADVI(n_mc), q, n_iter)

This is more consistent with the MCMC interface sample where the number of samples is supplied to sample not NUTS.
Dependencies
This currently depends on

the purported reboot PR for AdvancedVI and
the migration of Turing to the ADTypes interface in this PR.

I'll re-open this PR later when the v0.3 work is done.


Add Github Actions

Description
It would be great to run some checks before merging pull requests:

Running all tests
Checking code style

Hi @dvadym,
I'd like to work on this if it's open. :)

@tudorcebere sure, thank you!


Feature/page 404

Page 404 design

One important thing noted down by @atobajas it would be a good idea to move this notFoundPage to a stateless component (my fault, I initialliy created it as class component), I let it to you to update it here.

Good to go. Pending to open another case to discuss how are we going to handle the styles (SASS, BEM, CSS Modules ? ).


Add support for SaltStack (.sls) and Matlab (.m)

SaltStack and Matlab icons added to file-icons.woff
Matlab support can be turned on by changing file-icons.less

Comment out Objective-C .m files (line 290)
Uncomment lines 438-439 for Matlab/Octave .m files

As Objective-C is more popular than Matlab, I left the Matlab lines commented out by default.

Thanks for the pull request!
Sorry I am unfamiliar with Matlab file extension types. Is .mat a common one? If so could we leave that uncommented since I don't believe there is a conflict?
Not sure how we want to handle both matlab and object c having the .m file types. //cc @DanBrooker

For matlab, .m is the most common type.  It's used for both functions and scripts.  A .mat is just used to store data.
I'd tried to be able to tell matlab scripts and objective-c .m files apart using mime type, but hadn't been able to figure it out.  I figure I'd leave it commented out and if you use matlab, uncomment it.
//cc @DanBrooker

The css uses the file name to determine which icon to use.
I think it would be possible to add a setting to enable matlab and override the objc icon. Or just have the snippet of code available for people to add to their own user stylesheets.

Has this been merged into upstream yet?
If not, it'll raise a conflict with a PR I just submitted earlier. Paging @DanBrooker just in case I should amend my earlier work.

SaltStack resolved. See #274 .


[3411] Fixes for non_importable_missing_funding records

Context
Add fixes to be able to import trainees from dttp, that are being marked as the non_importable_missing_funding.
All of the approx 15k records, are early years salaried. These records are provided a grant/bursary based on the subject "Early years". Dttp seems to be providing a bit more granular detail in this case, eg "English studies", or "computer science".
Changes proposed in this pull request

Use commencement date from the latest placement assignment, as we use that, or fallback to the itt start date to determine the AcademicCycle.
Call Trainee#set_early_years_course_details before creating a trainee, as done in the standard trainee creation flow.
Add NO_BURSARY_AWARDED to map trainees not on any bursaries
Bug fix for when multiple funding methods are available.
Enable data migrations in the dttpimport environment, similar to staging/production.

Guidance to review
:ship:

 Investigate 21/22 trainees in state non_importable_missing_funding


Fix workspace list empty state not showing immediate

Details

Fixed the issue of Workspace - the welcome message does not appear immediately after deleting the workspace.
Changes - While online filter out all the delete pending policy if it not have an error.
Fixed Issues

$ https://github.com/Expensify/App/issues/13615
PROPOSAL: https://github.com/Expensify/App/issues/13615#issuecomment-1363886220
Tests

Login with any account.
Go to Settings -> Workspace (you should have only one workspace, if more than one delete them).
Click on workspace to navigate to workspace detail page.
Click on 3 dot and click on "Delete workspace".
Confirm the modal to delete the workspace.
It will navigate to workspace list page.
Verify welcome message (empty list message) appear immediately.

[ ] Verify that no errors appear in the JS console

Offline tests

Login with any account.
Go to Settings -> Workspace (you should have only one workspace, if more than one delete them).
Disable the internet connection in the device.
Click on workspace to navigate to workspace detail page.
Click on 3 dot and click on "Delete workspace".
Confirm the modal to delete the workspace.
It will navigate to workspace list page.
Verify the workspace is now displayed with a strikethrough indicating it will be deleted when back online.
Enable the internet connection in the device.
Verify welcome message (empty list message) appear immediately.

QA Steps

Login with any account.
Go to Settings -> Workspace (you should have only one workspace, if more than one delete them).
Click on workspace to navigate to workspace detail page.
Click on 3 dot and click on "Delete workspace".
Confirm the modal to delete the workspace.
It will navigate to workspace list page.
Verify welcome message (empty list message) appear immediately.

[ ] Verify that no errors appear in the JS console

PR Author Checklist

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

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

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

[x] Android / native
[x] Android / Chrome
[x] iOS / native
[x] iOS / Safari
[x] MacOS / Chrome / Safari
[x] MacOS / Desktop

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

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is correct English and approved by marketing by adding the Waiting for Copy label for a copy review on the original GH to get the correct copy.
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

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

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

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

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

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

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

[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[x] I have checked off every checkbox in the PR author checklist, including those that don't apply to this PR.

Screenshots/Videos

Web

https://user-images.githubusercontent.com/114683042/211206506-f82abcb9-35a8-437e-9143-c30a4985bd05.mov

Mobile Web - Chrome

https://user-images.githubusercontent.com/114683042/211207119-4ae716dd-1eb8-46d0-b8ce-74d3b7a317d2.mov

Mobile Web - Safari

https://user-images.githubusercontent.com/114683042/211207464-a1273aa0-1cf0-4fb4-8cfd-0f9601f71684.mov

Desktop

https://user-images.githubusercontent.com/114683042/211207154-1f8dd4f4-6a35-49f3-85b4-6cc9ff18583b.mov

iOS

https://user-images.githubusercontent.com/114683042/211207438-2afaa4b7-ff50-49c9-98f5-56e25beefb7a.mov

Android

https://user-images.githubusercontent.com/114683042/211207172-ae33e6b3-8394-4e04-a07b-ba38bc603375.mov

@parasharrajat do you have any feedback, any changes required ?

@parasharrajat can you plz look into this.

I am testing it ATM. There are a few strange behaviors that may not be related to this PR.

@parasharrajat I think you are facing problem like if we do quick actions like create and delete sometime workspace reappear for few secs. this issue already in discussion in different GH issue.

@parasharrajat I think this PR related to only welcome message not showing which was regression of a issue fixed. where delete pending condition was removed. So we have added back this condition to exact match offline component condition:
const hideChildren = !props.network.isOffline && props.pendingAction === 'delete' && !hasErrors;

@NikkiWines I think you have already reviewed the PR. Can you plz try to approve ASAP. We are very near to 3 days deadline 🙂

@NikkiWines can you plz look into this. only few minutes left.

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

@jatinsonijs I appreciate the urgency and I'll talk to @mallenexpensify about the 3-day deadline. However, this was approved under 24 hours ago (and after 6pm in the timezone I'm in), so I only just now had a chance to re-review. Please be aware that there are lots of other commitments and multiple bumps within such a short time period doesn't necessarily get a reviewer to look quicker.

I understand @NikkiWines, I don't want to disturb. I was just trying my best to make it merge within 3 days.

🚀 Deployed to staging by @NikkiWines in version: 1.2.54-0 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

🚀 Deployed to production by @AndrewGable in version: 1.2.54-2 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅


Lighthouse bug 50 - Don't hardcode models directory

Multiple people have been affected by this.  It would be good to fix as it makes porting from Play 1 to Play 2 much more difficult for some users.

I believe this is fixed now. Thank you

Cool.  Thanks Peter!  Much better than my fix too :-)


Bump version to 0.13.2

To let dependents pick up the updated cookie version

Thanks for merging, can anyone publish the new version?

Published.


Fleet: if there's a problem with 1 cluster syncing, appears that all clusters have the same issue

When looking at the page for Fleet clusters and their syncing status, if one cluster has a problem, the UI makes it look like all the clusters have problems.
Internal reference: SURE-3568

@gaktive I cannot reproduce this. Could there be a step-by-step guide to achieve this outcome?
One thing that could possibly affect all Fleet Clusters is that if Fleet itself had a problem, but I don't know if that was the case.
Thanks

Since this issue was moved to 2.6.5, will move it back to "backlog". Related with
https://github.com/rancher/dashboard/issues/1632

On way to reproduce with 2.6.3:

Deploy any deployment to at least two clusters.
Manually edit the deployment in one cluster. E.g. change the amount of replicas in the deployment.
On the GitRepo detail page both deployment entries for both clusters are marked as "Modified", though it should only be the deployment of the cluster that was edited.

@Shavindra Can you try and reproduce this

Update from SURE-3568:

The user confirmed that, right now, they do have 65 repos and 55 clusters. Most of the repos apply to all clusters (target clusters are mostly k8s clusters at different factories within the group).

Additional information available.

I think this need a backend fix as well as UI fix.
This repo has 2 clusters with one error. However readyClusters/desiredReadyClusters is 1/2. As you can see the overall state fleet-mc-helm-kustomize-example/redis-slave is on transitioning. It has one perClusterState. From this I can infer if the perClusterState doesn't have an object with matching clusterId, then clusterState is active instead of error/transitioning. However, I feel that it should have may be 2 perClusterState rather than inferring?
@gaktive @nwmac

"id": "fleet-ws/helm-kustomize",
"type": "fleet.cattle.io.gitrepo",
"links": {
    "remove": "…/v1/fleet.cattle.io.gitrepos/fleet-ws/helm-kustomize",
    "self": "…/v1/fleet.cattle.io.gitrepos/fleet-ws/helm-kustomize",
    "update": "…/v1/fleet.cattle.io.gitrepos/fleet-ws/helm-kustomize",
    "view": "…/apis/fleet.cattle.io/v1alpha1/namespaces/fleet-ws/gitrepos/helm-kustomize"
},
"apiVersion": "fleet.cattle.io/v1alpha1",
"kind": "GitRepo",
"metadata": {
    "creationTimestamp": "2022-03-17T14:09:49Z",
    "fields": [
        5 items
"helm-kustomize",
        "https://github.com/rancher/fleet-examples.git",
        "43d73d518157fd7cca661ac950a54e61690a0cde",
        "1/2",
        "NotReady(1) [Bundle helm-kustomize-multi-cluster-helm-kustomize]; deployment.apps fleet-mc-helm-kustomize-example/redis-slave [progressing,error] Deployment does not have minimum availability., Progress deadline exceeded"
    ],
    "generation": 1,
    "managedFields": [
        2 items
{
            "apiVersion": "fleet.cattle.io/v1alpha1",
            "fieldsType": "FieldsV1",
            "fieldsV1": {
                "f:spec": {
                    ".": {},
                    "f:branch": {},
                    "f:insecureSkipTLSVerify": {},
                    "f:paths": {},
                    "f:repo": {},
                    "f:targets": {}
                }
            },
            "manager": "rancher",
            "operation": "Update",
            "time": "2022-03-17T14:09:49Z"
        },
        {
            "apiVersion": "fleet.cattle.io/v1alpha1",
            "fieldsType": "FieldsV1",
            "fieldsV1": {
                "f:status": {
                    ".": {},
                    "f:commit": {},
                    "f:conditions": {},
                    "f:desiredReadyClusters": {},
                    "f:display": {
                        ".": {},
                        "f:readyBundleDeployments": {},
                        "f:state": {}
                    },
                    "f:gitJobStatus": {},
                    "f:lastSyncedImageScanTime": {},
                    "f:observedGeneration": {},
                    "f:readyClusters": {},
                    "f:resourceCounts": {
                        ".": {},
                        "f:desiredReady": {},
                        "f:missing": {},
                        "f:modified": {},
                        "f:notReady": {},
                        "f:orphaned": {},
                        "f:ready": {},
                        "f:unknown": {},
                        "f:waitApplied": {}
                    },
                    "f:resources": {},
                    "f:summary": {
                        ".": {},
                        "f:desiredReady": {},
                        "f:nonReadyResources": {},
                        "f:notReady": {},
                        "f:ready": {}
                    }
                }
            },
            "manager": "fleetcontroller",
            "operation": "Update",
            "subresource": "status",
            "time": "2022-03-17T15:01:14Z"
        }
    ],
    "name": "helm-kustomize",
    "namespace": "fleet-ws",
    "relationships": [
        5 items
{
            "toId": "fleet-ws/helm-kustomize-config-7a1b46446d5d",
            "toType": "configmap",
            "rel": "owner",
            "state": "active",
            "message": "Resource is always ready"
        },
        {
            "toId": "fleet-ws/git-helm-kustomize",
            "toType": "serviceaccount",
            "rel": "owner",
            "state": "active",
            "message": "Resource is current"
        },
        {
            "toId": "fleet-ws/git-helm-kustomize",
            "toType": "rbac.authorization.k8s.io.role",
            "rel": "owner",
            "state": "active",
            "message": "Resource is current"
        },
        {
            "toId": "fleet-ws/git-helm-kustomize",
            "toType": "rbac.authorization.k8s.io.rolebinding",
            "rel": "owner",
            "state": "active",
            "message": "Resource is current"
        },
        {
            "toId": "fleet-ws/helm-kustomize",
            "toType": "gitjob.cattle.io.gitjob",
            "rel": "owner",
            "state": "active",
            "message": "Resource is current"
        }
    ],
    "resourceVersion": "3894821",
    "state": {
        "error": false,
        "message": "",
        "name": "notready",
        "transitioning": false
    },
    "uid": "d9b7e86b-e053-492d-87f2-61a0af837da7"
},
"spec": {
    "branch": "master",
    "insecureSkipTLSVerify": false,
    "paths": [
        "/multi-cluster/helm-kustomize"
    ],
    "repo": "https://github.com/rancher/fleet-examples.git",
    "targets": [
        {
            "clusterSelector": {
                "matchExpressions": [
                    {
                        "key": "provider.cattle.io",
                        "operator": "NotIn",
                        "values": [
                            "harvester"
                        ]
                    }
                ]
            }
        }
    ]
},
"status": {
    "commit": "43d73d518157fd7cca661ac950a54e61690a0cde",
    "conditions": [
        6 items
{
            "error": true,
            "lastUpdateTime": "2022-03-17T15:04:13Z",
            "message": "NotReady(1) [Bundle helm-kustomize-multi-cluster-helm-kustomize]; deployment.apps fleet-mc-helm-kustomize-example/redis-slave [progressing,error] Deployment does not have minimum availability., Progress deadline exceeded",
            "status": "False",
            "transitioning": true,
            "type": "Ready"
        },
        {
            "error": false,
            "lastUpdateTime": "2022-03-17T15:59:57Z",
            "status": "True",
            "transitioning": false,
            "type": "Accepted"
        },
        {
            "error": false,
            "lastUpdateTime": "2022-03-17T14:09:49Z",
            "status": "True",
            "transitioning": false,
            "type": "ImageSynced"
        },
        {
            "error": false,
            "lastUpdateTime": "2022-03-17T14:09:49Z",
            "status": "False",
            "transitioning": false,
            "type": "Reconciling"
        },
        {
            "error": false,
            "lastUpdateTime": "2022-03-17T14:09:49Z",
            "status": "False",
            "transitioning": false,
            "type": "Stalled"
        },
        {
            "error": false,
            "lastUpdateTime": "2022-03-17T15:59:57Z",
            "status": "True",
            "transitioning": false,
            "type": "Synced"
        }
    ],
    "desiredReadyClusters": 2,
    "display": {
        "readyBundleDeployments": "1/2",
        "state": "NotReady"
    },
    "gitJobStatus": "Current",
    "lastSyncedImageScanTime": null,
    "observedGeneration": 1,
    "readyClusters": 1,
    "resourceCounts": {
        "desiredReady": 6,
        "missing": 0,
        "modified": 0,
        "notReady": 1,
        "orphaned": 0,
        "ready": 5,
        "unknown": 0,
        "waitApplied": 0
    },
    "resources": [
        6 items
{
            "apiVersion": "apps/v1",
            "id": "fleet-mc-helm-kustomize-example/frontend",
            "kind": "Deployment",
            "name": "frontend",
            "namespace": "fleet-mc-helm-kustomize-example",
            "state": "Ready",
            "type": "apps.deployment"
        },
        {
            "apiVersion": "apps/v1",
            "id": "fleet-mc-helm-kustomize-example/redis-master",
            "kind": "Deployment",
            "name": "redis-master",
            "namespace": "fleet-mc-helm-kustomize-example",
            "state": "Ready",
            "type": "apps.deployment"
        },
        {
            "apiVersion": "apps/v1",
            "error": true,
            "id": "fleet-mc-helm-kustomize-example/redis-slave",
            "kind": "Deployment",
            "message": "Deployment does not have minimum availability.; Progress deadline exceeded",
            "name": "redis-slave",
            "namespace": "fleet-mc-helm-kustomize-example",
            "perClusterState": [
                {
                    "clusterId": "fleet-ws/c-rd44v",
                    "error": true,
                    "message": "Deployment does not have minimum availability.; Progress deadline exceeded",
                    "state": "updating",
                    "transitioning": true
                }
            ],
            "state": "updating",
            "transitioning": true,
            "type": "apps.deployment"
        },
        {
            "apiVersion": "v1",
            "id": "fleet-mc-helm-kustomize-example/frontend",
            "kind": "Service",
            "name": "frontend",
            "namespace": "fleet-mc-helm-kustomize-example",
            "state": "Ready",
            "type": "service"
        },
        {
            "apiVersion": "v1",
            "id": "fleet-mc-helm-kustomize-example/redis-master",
            "kind": "Service",
            "name": "redis-master",
            "namespace": "fleet-mc-helm-kustomize-example",
            "state": "Ready",
            "type": "service"
        },
        {
            "apiVersion": "v1",
            "id": "fleet-mc-helm-kustomize-example/redis-slave",
            "kind": "Service",
            "name": "redis-slave",
            "namespace": "fleet-mc-helm-kustomize-example",
            "state": "Ready",
            "type": "service"
        }
    ],
    "summary": {
        "desiredReady": 2,
        "nonReadyResources": [
            {
                "bundleState": "NotReady",
                "name": "helm-kustomize-multi-cluster-helm-kustomize",
                "nonReadyStatus": [
                    {
                        "apiVersion": "apps/v1",
                        "kind": "Deployment",
                        "name": "redis-slave",
                        "namespace": "fleet-mc-helm-kustomize-example",
                        "summary": {
                            "error": true,
                            "message": [
                                2 items
"Deployment does not have minimum availability.",
                                "Progress deadline exceeded"
                            ],
                            "state": "updating",
                            "transitioning": true
                        },
                        "uid": "bcc427c2-d738-41df-9d7c-78324375bfc1"
                    }
                ]
            }
        ],
        "notReady": 1,
        "ready": 1
    }
}
}

I've created a ticket for BE: https://github.com/rancher/rancher/issues/36947
CC: @gaktive @nwmac

Duplicate: https://github.com/rancher/dashboard/issues/5402

I'll close this as a duplicate of 5402. Will track work there.


Ripple effect not working in material2

After update previews version of material the button not showing the ripple effect . Currently i am using material 2

You can provide an example code that fails here: https://stackblitz.com/edit/dialog-example
It helps the team to better understand your case.

Closing this issue as it does not follow the issue template. Please file a new issue that follows the template, which gives the team the information needed to investigate.


ND Sig Moves

https://github.com/Karthik99999/dl.psim.us/commit/119ed9bdc9305033559e4dcf580661e4a923e5e6 added the change here, made it a rule so it can be applied to other formats


Check hook callback is not boolean

Is your feature request related to a problem?
A client wanting to return false to a filter, did:
	add_filter( 'liveblog_entry_enable_embeds', false );

...instead of:
	add_filter( 'liveblog_entry_enable_embeds', '__return_false' );

Describe the solution you'd like
When a boolean false or true is given as the second arg of add_filter() or add_action(), make it an Error with a suggestion of what to use instead.
This could be extended to look for other __return_() functions, like null, 0, array(), etc.
Perhaps an error with a more vague message if it's anything non-callable?

Perhaps an error with a more vague message if it's anything non-callable?

Well, a tool like PHPCS can't determine if something is callable, it can only look for the format expected for a callable, i.e. (string) 'function_name' or (array) array('ClassName' or $obj, 'function_name').
Note: the callable can, of course, also be passed as a variable or combination of tokens, in which case, we're out of luck.
The below are all perfectly valid and IMO no error/warning should be thrown for any of these:
add_action('action_name', $my_callable);
add_action('action_name', $my->callable);
add_action('action_name', ClassName::$callable);
add_filter('filter_name', ($foo ? $foo_prefix : $bar_prefix ) . 'function_name');

Having said that, I think a sniff which can pick up on some typical mistakes does have a place WPCS, but with the above in mind, IMO, it should only look for and throw errors for verified mistakes, such as outlined in the original use-case.

I am currently invoking add_action with a callback which isn't in a form o string as I do get validations using @sirbrillig's phpcs-import-detection. However, it looks like the correct way of adding a callback is to declare:
add_action(  'init', 'my_callback' );

rather than
add_action( 'init', my_callback );

Considering this, would it be acceptable to request that this plugin adds checks instead, considering add_action and add_filter are WordPress methods? Or is still OK to declare it as in the first example?
Thanks

@zanona Your question is not clear to me, would you mind trying to rephrase ?
As for the following code sample:

add_action( 'init', my_callback );

This could be perfectly valid code if there is a constant declared called my_callback which contains the name of the callback function/method.

@jrfnl sorry, I meant it like this:
function my_callback {...}
add_action('init', my_callback);

So by using my_callback without quotes, with the plugin I mentioned earlier, I am able to catch errors like the callback being declared but not defined previously. but if I use quotes, since it's just a string, that plugin cannot check if the method indeed exists since it doesn't have knowledge about add_filter or add_action and that the second argument should be an existent function.
But, perhaps by defining as I am at the moment, using the method name directly without quotes is not a big problem?
thanks

But, perhaps by defining as I am at the moment, using the method name directly without quotes is not a big problem?

Using the method name without quotes will break your plugin as that's not a valid way to declare a callback (unless you define constants for all of them).
Please read up on callbacks to understand how it works: https://www.php.net/manual/en/language.types.callable.php

but if I use quotes, since it's just a string, that plugin cannot check if the method indeed exists since it doesn't have knowledge about add_filter or add_action and that the second argument should be an existent function.

That sounds like something which should be fixed in that external standard, especially as that standard already has some work-arounds in place for WordPress anyway.

@jrfnl thanks for the insight. Great to learn about the proper way of doing this. Perhaps it can be implemented on phpcs-import-detection, then. cc/ @sirbrillig.

Won't phpcs-import-detection already warn you about using something like add_action('init', my_callback); without a constant definition for my_callback? Or are you suggesting that we add special detection for functions like add_action() which knows that the second argument should be callable? If it's the latter, I'd suggest just using types instead; making a custom function as a delegate, like:
function wp_add_action( string $tag, callable $callback, int $priority = 10, int $accepted_args = 1 ) {
  add_action( $ag, $callback, $priority, $accepted_args );
}

@sirbrillig, currently phpc-import-dection does warn you but only if the callback is not wrapped in quotes (as a string). so add_action('init', 'my_callback')  wouldn't trigger any warning since it doesn't know that the second argument (string) should be a method name and search for already declared ones. Apparently not using quotes for declaring a callback isn't correct as previously mentioned?

add_action('init', 'my_callback') wouldn't trigger any warning since it doesn't know that the second argument (string) should be a method name and search for already declared ones.

Correct. We'd need either a special list of functions or static analysis to be able to know if a string argument is a function reference. Unfortunately this is just how PHP uses function references. We could add such a special list (in fact, we have a special list for functions which mutate their arguments already), but it would only work for functions in that list. That might be a good feature request.

Apparently not using quotes for declaring a callback isn't correct as previously mentioned?

You're right. It's not just an incorrect pattern, it's actually invalid PHP, even though the current version of PHP will allow it by automatically converting the symbol into a string with a warning. In the next version of PHP it's likely to be a fatal error instead of just a warning.


Bucket Tier[GET]: API to list all created tier policy

Issue/Feature Description:
As a admin/user, I want to list down all available tier policy
Why this issue to fixed / feature is needed(give scenarios or use cases):
How to reproduce, in case of a bug:
Other Notes /  Environment Information: (Please give the env information, log link or any useful information for this issue)

List all Tiers:
GET http://IP:PORT/v1/tenantId/tiers
Request Body:
N/A
Response:
ReturnCode: integer, Ex:200
Message: [], Ex: [Gold]
Get Tier:
GET http://IP:PORT/v1/tenantId/tiers/tierId
Request Body:
N/A
Response:
ReturnCode: integer, Ex:200
Message: json


[Wearable/MachineLearning] Update package versions after tizen 6.0

Target tizen 6.0
Update Sdk and package versions

Signed-off-by: Yongjoo Ahn<EMAIL_ADDRESS>

Tested with both 6.0 emulator and device.


Enable colors in the prompt

Allow to color the path part only.

Fixed in https://github.com/prefix-dev/shell/pull/79.


Adding HealthFit Project

*Please assign me the issue..

Please describe your project

ok sure, it's a frontend project using HTML, CSS, js.
Features: the web app allows you to search exercises of your interest with a lot of filter options. It allows you to search exercises with respect to body parts and gave you more detail about the exercises that resembles the specified exercise in terms of target muscle or in terms of equipments.

@pranjay-poddar please assign me this issue under hacktoberfest


cleanup(docs): Remove outdated and complex information from the README

Motivation
Our README contains some information that is outdated or too complex for an introductory document.
Depends-On: #6729
(Required fix for CI to pass.)
Guidelines
https://www.freecodecamp.org/news/how-to-write-a-good-readme-file/
Solution
Replace the outdated future work section
Remove CI workflow badges that are lower priority information
Remove detailed descriptions of features that are experimental or developer-focused
Review
This is a low priority cleanup
Reviewer Checklist

[ ] Will the PR name make sense to users?

[ ] Does it need extra CHANGELOG info? (new features, breaking changes, large changes)

[ ] Are the PR labels correct?
[ ] Does the code do what the ticket and PR says?

[ ] Does it change concurrent code, unsafe code, or consensus rules?

[ ] How do you know it works? Does it have tests?

@mergifyio update

Needed the CI fix in PR #6729 to merge


proxy_request_buffering_off: fixed unhandled read/write event

This bug may cause CPU 100% if tengine uses LEVEL event module
(e.g. select, poll, /dev/poll).
While receiving write event from upstream connection, it tries to read
data from client and check whether there is enough data to send to upstream.
If there is not enough data, it just returns and waits next event. However,
there is a bug that it does not "handle" the write event. If it does not delete
the write event from /dev/poll, this write event will be reported to tengine again.
And then tengine has infinite loops.
For read event, the situation is similar to write event.
Thanks to Arne Jansen.

Looks good to me.


Error while compiling

Having this error while compiling
arm-vita-eabi-gcc -Wl,-q -Wall -O3 -nostartfiles   -c -o main.o main.c
In file included from main.c:36:0:
power.h:15:6: error: conflicting types for 'scePowerSetGpuXbarClockFrequency'
void scePowerSetGpuXbarClockFrequency(int freq);
^
In file included from power.h:1:0,
from main.c:36:
/usr/local/vitasdk/arm-vita-eabi/include/psp2/power.h:43:5: note: previous declaration of 'scePowerSetGpuXbarClockFrequency' was here
int scePowerSetGpuXbarClockFrequency(int freq); // Set Clock Frequency of the Gpu Crossbar
^
: recipe for target 'main.o' failed
make: *** [main.o] Error 1

Fix it to change power.h 15 line:
void scePowerSetGpuXbarClockFrequency(int freq);
to
`int scePowerSetGpuXbarClockFrequency(int freq);

New errors: arm-vita-eabi-gcc -Wl,-q -Wall -O3 -nostartfiles   -c -o main.o main.c
In file included from main.c:36:0:
power.h:15:6: error: conflicting types for 'scePowerSetGpuXbarClockFrequency'
void scePowerSetGpuXbarClockFrequency(int freq);
^
In file included from power.h:1:0,
from main.c:36:
/usr/local/vitasdk/arm-vita-eabi/include/psp2/power.h:43:5: note: previous declaration of 'scePowerSetGpuXbarClockFrequency' was here
int scePowerSetGpuXbarClockFrequency(int freq); // Set Clock Frequency of the Gpu Crossbar
^
main.c: In function 'blit_thread':
main.c:92:2: error: expected ';' before 'scePowerSetBusClockFrequency'
scePowerSetBusClockFrequency(111)
^
main.c:99:2: error: expected ';' before 'scePowerSetBusClockFrequency'
scePowerSetBusClockFrequency(41)
^
: recipe for target 'main.o' failed
make: *** [main.o] Error 1

My bad i forgot 1 ";", just clone again and your golden


Shadow glitch

Operating system or device - Godot version:
windows7 x64
https://bintray.com/calinou/godot/editor/2017-07-24.11c14b8
Issue description:
Look at the shadow, it looks like be cut at half.

Steps to reproduce:
Import the project provided below, and open Game.tscn.
Link to minimal example project:
WeirdShadow.zip

Bisection says 9483613, but I'm not really sure since this scene uses MeshInstance with plane mesh, which doesn't exist before that commit, so I tested with TestCube instead. The glitch isn't as bad as shown. So I'm not sure if the issue comes from that commit or before that.

it might be caused by the lack of contact shadows.
https://twitter.com/reduzio/status/829151000007151616
i have a similar looking scene that can be fixed with contact enabled, except for this #9740

It looks like shadow bias is set too high. If you use a directional light you can tune it down to reduce the gap drastically. Only then, see if you need contact shadows.

@Zylann thats true, but by default is set to 1, so maybe a better default would be 0.08, it makes shadows look way better.

I don't know what the best defaults are, any help regarding testing, checking the value other engines have as default, etc. would help

closed via a1d7c496b


Scope and Parameters missing in the document

https://docs.microsoft.com/en-us/azure/security-center/update-regulatory-compliance-packages
This document shows once we select and add the new dynamic package, it automatically gets reflected in the portal.However, in my testing, I see that it is redirected to new page and asking to select the scope and parameters which is being missed in the documentation. Kindly update the document

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

ID: a9fbe6ca-1f70-657b-fc1a-c488335bdef6
Version Independent ID: 4962534a-ec5a-bc9a-f0ec-2074cf446807
Content: How to update to dynamic regulatory compliance monitoring in your Azure Security Center regulatory compliance dashboard
Content Source: articles/security-center/update-regulatory-compliance-packages.md
Service: security-center
GitHub Login: @memildin
Microsoft Alias: memildin

@priyankareddy20 Thank you for pointing that out. We will investigate and update the thread.

Hello,
I am being redirected to a page which has 4 pages within
ask for a remediation task, managed identity and all
would like to know if we need to create a  remedation task while enabling dynamic package

@priyankareddy20 We are reaching out to the authors for  review on this document and further info.
@memildin Could you please review this document and see how best we can improve the same ?

We've added a sentence to this page to indicate that there'll be a requirement to enter details.
Since the parameters are unique to each initiative type, we won't be specifying them in the doc.
Thanks for the feedback.
#please-close


#75 Enhance Fermenter for easier generation resource unit testing

Description
Adopting projects have reported that testing generation artifacts is complex. Implementors usually favor manual steps while recognizing that this is a non-optimal approach. For instance, the most common approach is running a project's entire plugin to see if the desired outputs are created appropriately.
This ticket should provide an initial increment of functionality that lowers the bar for unit testing generation resources. If we can make this process very easy, it will incentivize projects to push more of their testing testing effort "left" into unit tests.
This issue is tracking https://github.com/TechnologyBrewery/fermenter/issues/75

I'm a little confused how this meets the needs of #75.  That ticket talks about providing test-friendly and/or test-specific APIs to ease testing in projects consuming Fermenter.  It seems like this is just tests within Fermenter itself.  The only change that would impact consumers would be ExpandedProfile fix, but I can't connect the dots on how that eases testing.
Can you explain a bit about what you're going for in this PR?

@ewilkins-csi  Yup!
From what I understood, the intention of this unit test is to provide consumers of fermenters to make sure they have correct configuration of profiles.json and targets.json. i.e. if consumer specified xyz template files, we make sure there’s xyz template file exists in the codebase and so forth.
My test cases are example of how configuration testing can be done and consumers can implement those unit tests with changing parameters.
Fermenter’s unit test as defined here have a goal that fermenter can function as expected.
My testing’s goal is to provide user that this is what their intention for configuring json files (profiles and target) so that they expect to have correct artifacts generated.
Does that make sense?
maybe I might have made this bit complicated for consumers?
Im open to ideas!

Following up on the conversation above.  We had a conversation offline about how this will meet the needs outlined in the ticket.  Discussed pulling some of the example logic in the unit tests (e.g. for loading profiles/targets, making assertions about profiles) into an actual test utility class that could be directly used by consumers rather than just copying the example code completey.