Skip to content

Commit 9236273

Browse files
authored
PULP_API_BASE_PATH - hardcode to use API_BASE_PATH + 'pulp/api/v3/' (#2501)
* PULP_API_BASE_PATH - hardcode to use API_BASE_PATH + 'pulp/api/v3/' related to packaging!11, #2135 mostly undoes #1857 config changes but not code changes `packaging/roles/publish/files/config/downstream.webpack.config.js` can't easily have version-dependent logic, so having individual webpack configs provide `PULP_API_BASE_PATH` doesn't quite work, but having the constant available in code is still useful. => ignoring any PULP_API_BASE_PATH config options or env variables, hardcoding PULP_API_BASE_PATH global to be based on API_BASE_PATH in 4.6+ (for 4.5 and older, the url is just /pulp/api/v3/) No-Issue * test/: consistently use pulpPrefix for PULP_API_BASE_PATH
1 parent 309f87a commit 9236273

8 files changed

+8
-9
lines changed

config/community.prod.webpack.config.js

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ const webpackBase = require('./webpack.base.config');
44
module.exports = webpackBase({
55
API_HOST: '',
66
API_BASE_PATH: '/api/',
7-
PULP_API_BASE_PATH: '/api/pulp/api/v3/',
87
UI_BASE_PATH: '/ui/',
98
DEPLOYMENT_MODE: 'standalone',
109
NAMESPACE_TERM: 'namespaces',

config/insights.dev.webpack.config.js

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ module.exports = webpackBase({
99

1010
// Path to the API on the API host. EX: /api/automation-hub
1111
API_BASE_PATH: '/api/automation-hub/',
12-
PULP_API_BASE_PATH: '/api/automation-hub/pulp/api/v3/',
1312

1413
// Value for standalone.api.target
1514
API_PROXY_TARGET: `http://${proxyHost}:${proxyPort}`,

config/insights.prod.webpack.config.js

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ const webpackBase = require('./webpack.base.config');
44
module.exports = webpackBase({
55
API_HOST: '',
66
API_BASE_PATH: '/api/automation-hub/',
7-
PULP_API_BASE_PATH: '/api/automation-hub/pulp/api/v3/',
87
UI_BASE_PATH: '',
98
DEPLOYMENT_MODE: 'insights',
109
NAMESPACE_TERM: 'partners',

config/standalone.dev.webpack.config.js

-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ module.exports = webpackBase({
1212

1313
// Path to the API on the API host. EX: /api/automation-hub
1414
API_BASE_PATH: apiBasePath,
15-
PULP_API_BASE_PATH: apiBasePath + 'pulp/api/v3/',
1615

1716
// Path on the host where the UI is found. EX: /apps/automation-hub
1817
UI_BASE_PATH: '/ui/',

config/standalone.prod.webpack.config.js

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ const webpackBase = require('./webpack.base.config');
44
module.exports = webpackBase({
55
API_HOST: '',
66
API_BASE_PATH: '/api/galaxy/',
7-
PULP_API_BASE_PATH: '/api/galaxy/pulp/api/v3/',
87
UI_BASE_PATH: '/ui/',
98
DEPLOYMENT_MODE: 'standalone',
109
NAMESPACE_TERM: 'namespaces',

config/webpack.base.config.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ const defaultConfigs = [
2727
// as a constant after it is compiled
2828
{ name: 'API_HOST', default: '', scope: 'global' },
2929
{ name: 'API_BASE_PATH', default: '', scope: 'global' },
30-
{ name: 'PULP_API_BASE_PATH', default: '', scope: 'global' },
3130
{ name: 'UI_BASE_PATH', default: '', scope: 'global' },
3231
{ name: 'DEPLOYMENT_MODE', default: 'standalone', scope: 'global' },
3332
{ name: 'NAMESPACE_TERM', default: 'namespaces', scope: 'global' },
@@ -65,6 +64,11 @@ module.exports = (inputConfigs) => {
6564
}
6665
});
6766

67+
// 4.6+: pulp APIs live under API_BASE_PATH now, ignore previous overrides
68+
globals.PULP_API_BASE_PATH = JSON.stringify(
69+
customConfigs.API_BASE_PATH + 'pulp/api/v3/',
70+
);
71+
6872
const isStandalone = customConfigs.DEPLOYMENT_MODE !== 'insights';
6973

7074
// config for HtmlWebpackPlugin

test/cypress.env.json.template

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"prefix": "/api/automation-hub/",
3-
"pulpPrefix":"/api/automation-hub/pulp/api/v3/",
3+
"pulpPrefix": "/api/automation-hub/pulp/api/v3/",
44
"username": "admin",
55
"password": "admin",
66
"settings": "../../galaxy_ng/galaxy_ng/app/settings.py",

test/cypress/e2e/task_status.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ describe('test status filter label on list view', () => {
44
cy.visit('/ui/tasks');
55
cy.intercept(
66
'GET',
7-
Cypress.env('prefix') +
8-
'pulp/api/v3/tasks/?ordering=-pulp_created&offset=0&limit=10',
7+
Cypress.env('pulpPrefix') +
8+
'tasks/?ordering=-pulp_created&offset=0&limit=10',
99
).as('tasks');
1010

1111
cy.wait('@tasks');

0 commit comments

Comments
 (0)