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

Fix COMPANION_PATH #3515

Merged
merged 7 commits into from
Mar 2, 2022
Merged

Fix COMPANION_PATH #3515

merged 7 commits into from
Mar 2, 2022

Conversation

mifi
Copy link
Contributor

@mifi mifi commented Feb 25, 2022

make sure it serves everything served behind that path
fixes #3514

NOTE: This is probably a breaking change if some people expect /metrics to be under the root even when specifying a COMPANION_PATH

make sure it serves everything served behind that path
fixes #3514
Copy link
Contributor

@aduh95 aduh95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think we could have a test for this?

@aduh95
Copy link
Contributor

aduh95 commented Feb 25, 2022

Regarding the breaking change: can we detect that users are expecting metrics/ to be in the root and emit a deprecation warning if that's the case?

@mifi
Copy link
Contributor Author

mifi commented Feb 25, 2022

Ah, you mean we serve it from both /metrics and from /subpath/metrics?

mifi added 4 commits February 25, 2022 20:58
as it's considered harmful in this case
an error thrown will also be printed to stderr
@mifi
Copy link
Contributor Author

mifi commented Feb 25, 2022

I added tests and did a few other improvements, as well as backward compatible redirect from /metrics to /subpath/metrics

mifi and others added 2 commits February 25, 2022 22:05
@mifi mifi merged commit 146d8f3 into main Mar 2, 2022
@mifi mifi deleted the fix-companion-path branch March 2, 2022 10:53
github-actions bot added a commit that referenced this pull request Mar 2, 2022
| Package                | Version | Package                | Version |
| ---------------------- | ------- | ---------------------- | ------- |
| @uppy/angular          |   0.3.0 | @uppy/locales          |   2.0.7 |
| @uppy/aws-s3-multipart |   2.2.1 | uppy                   |   2.7.0 |
| @uppy/companion        |   3.3.1 |                        |         |

- @uppy/companion: fix unstable test (Mikael Finstad)
- @uppy/companion: replace debug (Mikael Finstad)
- @uppy/companion: Fix COMPANION_PATH (Mikael Finstad / #3515)
- @uppy/angular: update ng version (Antoine du Hamel / #3503)
- @uppy/companion: Upload protocol "s3-multipart" does not use the chunkSize option (Gabi Ganam / #3511)
- @uppy/aws-s3-multipart: Add chunks back to prepareUploadParts, indexed by partNumber (Kevin West / #3520)
- website: Add “Stop the war” banner (Artur Paikin / #3518)
- @uppy/locales: Update zh_CN.js (linxunzyf / #3513)
- meta: update remark dependencies (Antoine du Hamel / #3502)
Murderlon added a commit that referenced this pull request Mar 7, 2022
* main:
  provider-view: fix breadcrumbs (#3535)
  Update BACKLOG.md
  Update ru_RU.js (#3529)
  @uppy/companion: reorder reqToOptions (#3530)
  meta: Fix yarn caching in github actions (#3526)
  Release: [email protected] (#3525)
  fix unstable test
  replace debug
  Fix COMPANION_PATH (#3515)
  @uppy/angular: update ng version (#3503)
  Upload protocol "s3-multipart" does not use the chunkSize option (#3511)
  Add chunks back to prepareUploadParts, indexed by partNumber (#3520)
  website: Add “Stop the war” banner (#3518)
vymao pushed a commit to vymao/uppy that referenced this pull request Mar 29, 2022
* main:
  provider-view: fix breadcrumbs (transloadit#3535)
  Update BACKLOG.md
  Update ru_RU.js (transloadit#3529)
  @uppy/companion: reorder reqToOptions (transloadit#3530)
  meta: Fix yarn caching in github actions (transloadit#3526)
  Release: [email protected] (transloadit#3525)
  fix unstable test
  replace debug
  Fix COMPANION_PATH (transloadit#3515)
  @uppy/angular: update ng version (transloadit#3503)
  Upload protocol "s3-multipart" does not use the chunkSize option (transloadit#3511)
  Add chunks back to prepareUploadParts, indexed by partNumber (transloadit#3520)
  website: Add “Stop the war” banner (transloadit#3518)
HeavenFox pushed a commit to docsend/uppy that referenced this pull request Jun 27, 2023
* Fix COMPANION_PATH

make sure it serves everything served behind that path
fixes transloadit#3514

* add tests for subpath

* chmod +x companion.sh

* remove process.exit

as it's considered harmful in this case
an error thrown will also be printed to stderr

* add backward compatible redirect

* Apply suggestions from code review

Co-authored-by: Antoine du Hamel <[email protected]>

* fix oops

Co-authored-by: Antoine du Hamel <[email protected]>
HeavenFox pushed a commit to docsend/uppy that referenced this pull request Jun 27, 2023
| Package                | Version | Package                | Version |
| ---------------------- | ------- | ---------------------- | ------- |
| @uppy/angular          |   0.3.0 | @uppy/locales          |   2.0.7 |
| @uppy/aws-s3-multipart |   2.2.1 | uppy                   |   2.7.0 |
| @uppy/companion        |   3.3.1 |                        |         |

- @uppy/companion: fix unstable test (Mikael Finstad)
- @uppy/companion: replace debug (Mikael Finstad)
- @uppy/companion: Fix COMPANION_PATH (Mikael Finstad / transloadit#3515)
- @uppy/angular: update ng version (Antoine du Hamel / transloadit#3503)
- @uppy/companion: Upload protocol "s3-multipart" does not use the chunkSize option (Gabi Ganam / transloadit#3511)
- @uppy/aws-s3-multipart: Add chunks back to prepareUploadParts, indexed by partNumber (Kevin West / transloadit#3520)
- website: Add “Stop the war” banner (Artur Paikin / transloadit#3518)
- @uppy/locales: Update zh_CN.js (linxunzyf / transloadit#3513)
- meta: update remark dependencies (Antoine du Hamel / transloadit#3502)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Companion standalone seems to ignore COMPANION_PATH
2 participants