Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.18.0 Prep #1105

Merged
merged 20 commits into from
Sep 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
37ba621
Do server-side logouts
nickdaugherty Sep 2, 2022
7380e89
Don't error for `vip login`
nickdaugherty Sep 2, 2022
32ab06a
Merge branch 'develop' into update/server-side-logout
nickdaugherty Sep 2, 2022
c348faf
[dev-env] Supports extended information table
pschoffer Sep 7, 2022
9a03d6d
add media redirect domain
pschoffer Sep 7, 2022
eb980f3
lint
pschoffer Sep 7, 2022
97b01f2
Don't pipe output through less
mjangda Sep 8, 2022
3058842
Merge pull request #1097 from Automattic/update/remove-pager
mjangda Sep 8, 2022
8e2f1f0
Add @app.env to commands help
pschoffer Sep 9, 2022
97c5e9f
jest
pschoffer Sep 9, 2022
b8787b1
Merge pull request #1092 from Automattic/update/server-side-logout
nickdaugherty Sep 9, 2022
83191d7
Merge pull request #1099 from Automattic/update/add_at_notation_to_help
pschoffer Sep 12, 2022
c4f83b0
Add GitHub action to mark inactive issues and PRs as stale
chriszarate Sep 12, 2022
efa7a82
Merge pull request #1100 from Automattic/add/stale-issue-pr-bot
mjangda Sep 13, 2022
249b9ba
Merge pull request #1096 from Automattic/add/extended_info
pschoffer Sep 13, 2022
b963a74
Remove http proxy support
nickdaugherty Sep 13, 2022
f629d3c
Merge pull request #1102 from Automattic/remove/http-proxy-support
nickdaugherty Sep 14, 2022
73423b1
Force the preference for WebSocket in case we see an error during con…
luismulinari Sep 14, 2022
a2ef323
2.18.0 prep
luismulinari Sep 15, 2022
9960018
Using http module instead of already decommisioned API.apiFetch funct…
saroshaga Sep 15, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Stale monitor

on:
schedule:
- cron: '0 0 * * *'

jobs:
stale:
name: Stale
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: Automattic/vip-actions/stale@trunk
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
## Changelog

### 2.18.0 (15 Sep 2022)
- #1103 Force the preference for WebSocket in case we see an error during connection
- #1102 Remove http proxy support
- #1096 [dev-env] Supports extended information table
- #1100 Add GitHub action to mark inactive issues and PRs as stale
- #1099 Add @app.env to commands help
- #1092 Improve login + logout
- #1097 Don't pipe output through less

### 2.17.0 (06 Sep 2022)
- #1093 [dev-env] use latest proxy image
- #1091 Extract http helper into standalone function
Expand Down
2 changes: 1 addition & 1 deletion __tests__/bin/vip-config-envvar-delete.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ describe( 'vip config envvar delete', () => {

describe( 'deleteEnvVarCommand', () => {
let args, opts;
const eventPayload = expect.objectContaining( { command: expect.stringContaining( 'vip config envvar delete' ) } );
const eventPayload = expect.objectContaining( { command: expect.stringContaining( 'vip @mysite.develop config envvar delete' ) } );
const executeEvent = [ 'envvar_delete_command_execute', eventPayload ];
const successEvent = [ 'envvar_delete_command_success', eventPayload ];

Expand Down
2 changes: 1 addition & 1 deletion __tests__/bin/vip-config-envvar-get-all.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ describe( 'getAllEnvVarsCommand', () => {
},
format: 'csv',
};
const eventPayload = expect.objectContaining( { command: 'vip config envvar get-all' } );
const eventPayload = expect.objectContaining( { command: 'vip @mysite.develop config envvar get-all' } );
const executeEvent = [ 'envvar_get_all_command_execute', eventPayload ];
const successEvent = [ 'envvar_get_all_command_success', eventPayload ];

Expand Down
2 changes: 1 addition & 1 deletion __tests__/bin/vip-config-envvar-get.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ describe( 'getEnvVarCommand', () => {
type: 'develop',
},
};
const eventPayload = expect.objectContaining( { command: 'vip config envvar get HELLO' } );
const eventPayload = expect.objectContaining( { command: 'vip @mysite.develop config envvar get HELLO' } );
const executeEvent = [ 'envvar_get_command_execute', eventPayload ];
const successEvent = [ 'envvar_get_command_success', eventPayload ];

Expand Down
2 changes: 1 addition & 1 deletion __tests__/bin/vip-config-envvar-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ describe( 'listEnvVarsCommand', () => {
},
format: 'csv',
};
const eventPayload = expect.objectContaining( { command: 'vip config envvar list' } );
const eventPayload = expect.objectContaining( { command: 'vip @mysite.develop config envvar list' } );
const executeEvent = [ 'envvar_list_command_execute', eventPayload ];
const successEvent = [ 'envvar_list_command_success', eventPayload ];

Expand Down
2 changes: 1 addition & 1 deletion __tests__/bin/vip-config-envvar-set.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ describe( 'vip config envvar set', () => {

describe( 'setEnvVarCommand', () => {
let args, opts;
const eventPayload = expect.objectContaining( { command: expect.stringContaining( 'vip config envvar set' ) } );
const eventPayload = expect.objectContaining( { command: expect.stringContaining( 'vip @mysite.develop config envvar set' ) } );
const executeEvent = [ 'envvar_set_command_execute', eventPayload ];
const successEvent = [ 'envvar_set_command_success', eventPayload ];

Expand Down
28 changes: 5 additions & 23 deletions __tests__/lib/http/proxy-agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
*/
import { SocksProxyAgent } from 'socks-proxy-agent';
import { HttpsProxyAgent } from 'https-proxy-agent';
import { HttpProxyAgent } from 'http-proxy-agent';

/**
* Internal dependencies
Expand All @@ -15,7 +14,7 @@ describe( 'validate CreateProxyAgent', () => {
beforeEach( () => {
// Clear all applicable environment variables before running test so each test starts "clean"
// using beforeEach instead of afterEach in case the client running tests has env variables set before the first test is run
const envVarsToClear = [ 'VIP_PROXY', 'HTTPS_PROXY', 'HTTP_PROXY', 'NO_PROXY', 'SOCKS_PROXY', 'VIP_USE_SYSTEM_PROXY' ];
const envVarsToClear = [ 'VIP_PROXY', 'HTTPS_PROXY', 'NO_PROXY', 'SOCKS_PROXY', 'VIP_USE_SYSTEM_PROXY' ];
for ( const envVar of envVarsToClear ) {
delete process.env[ envVar ];
}
Expand All @@ -25,17 +24,12 @@ describe( 'validate CreateProxyAgent', () => {
it.each( [
{
// No proxies set, should do nothing
envVars: [ { VIP_USE_SYSTEM_PROXY: '' }, { VIP_PROXY: '' }, { HTTPS_PROXY: '' }, { HTTP_PROXY: '' }, { SOCKS_PROXY: '' }, { NO_PROXY: '' } ],
envVars: [ { VIP_USE_SYSTEM_PROXY: '' }, { VIP_PROXY: '' }, { HTTPS_PROXY: '' }, { SOCKS_PROXY: '' }, { NO_PROXY: '' } ],
urlToHit: 'https://wpAPI.org/api',
},
{
// HTTPS Proxy set, but feature flag is not set, do nothing
envVars: [ { VIP_USE_SYSTEM_PROXY: '' }, { VIP_PROXY: '' }, { HTTPS_PROXY: 'https://myproxy.com' }, { HTTP_PROXY: '' }, { SOCKS_PROXY: '' }, { NO_PROXY: '' } ],
urlToHit: 'http://wpAPI.org/api',
},
{
// HTTP Proxy set, but feature flag is not set, do nothing
envVars: [ { VIP_USE_SYSTEM_PROXY: '' }, { VIP_PROXY: '' }, { HTTPS_PROXY: '' }, { HTTP_PROXY: 'http://myproxy.com' }, { SOCKS_PROXY: '' }, { NO_PROXY: '' } ],
envVars: [ { VIP_USE_SYSTEM_PROXY: '' }, { VIP_PROXY: '' }, { HTTPS_PROXY: 'https://myproxy.com' }, { SOCKS_PROXY: '' }, { NO_PROXY: '' } ],
urlToHit: 'http://wpAPI.org/api',
},
{
Expand All @@ -50,18 +44,12 @@ describe( 'validate CreateProxyAgent', () => {
},
{
// Proxy is enabled, but NO_PROXY is in effect
envVars: [ { VIP_USE_SYSTEM_PROXY: '1' }, { VIP_PROXY: '' }, { HTTPS_PROXY: '' }, { HTTP_PROXY: 'http://myproxy.com' },
{ SOCKS_PROXY: '' }, { NO_PROXY: '.wp.org,.lndo.site,foo.bar.org' } ],
urlToHit: 'https://wpAPI.wp.org/api',
},
{
// Proxy is enabled, but NO_PROXY is in effect
envVars: [ { VIP_USE_SYSTEM_PROXY: '1' }, { VIP_PROXY: '' }, { HTTPS_PROXY: '' }, { HTTP_PROXY: '' }, { SOCKS_PROXY: 'socks5://myproxy.com:4022' }, { NO_PROXY: 'wpAPI.org' } ],
envVars: [ { VIP_USE_SYSTEM_PROXY: '1' }, { VIP_PROXY: '' }, { HTTPS_PROXY: '' }, { SOCKS_PROXY: 'socks5://myproxy.com:4022' }, { NO_PROXY: 'wpAPI.org' } ],
urlToHit: 'https://wpAPI.org/api',
},
{
// Only the NO_PROXY is set, nothing should be proxied
envVars: [ { VIP_USE_SYSTEM_PROXY: '1' }, { VIP_PROXY: '' }, { HTTPS_PROXY: '' }, { HTTP_PROXY: '' }, { SOCKS_PROXY: '' }, { NO_PROXY: 'wpAPI.org,.lndo.site,foo.bar.org' } ],
envVars: [ { VIP_USE_SYSTEM_PROXY: '1' }, { VIP_PROXY: '' }, { HTTPS_PROXY: '' }, { SOCKS_PROXY: '' }, { NO_PROXY: 'wpAPI.org,.lndo.site,foo.bar.org' } ],
urlToHit: 'https://wpAPI.org/api',
},
] )( 'should return null with %o', async ( { envVars, urlToHit } ) => {
Expand Down Expand Up @@ -100,12 +88,6 @@ describe( 'validate CreateProxyAgent', () => {
urlToHit: 'https://wpAPI.org/api',
expectedClass: HttpsProxyAgent,
},
{
// Validate HTTP_PROXY is the third system proxy checked for
envVars: [ { VIP_USE_SYSTEM_PROXY: '1' }, { VIP_PROXY: '' }, { HTTPS_PROXY: '' }, { HTTP_PROXY: 'http://myproxy.com' }, { SOCKS_PROXY: '' }, { NO_PROXY: '' } ],
urlToHit: 'https://wpAPI.org/api',
expectedClass: HttpProxyAgent,
},
{
// Validate request is proxied if active no_proxy does not apply
envVars: [ { VIP_USE_SYSTEM_PROXY: '1' }, { VIP_PROXY: '' }, { HTTPS_PROXY: 'https://myproxy.com' }, { HTTP_PROXY: '' },
Expand Down
Loading