Skip to content
This repository has been archived by the owner on Jan 31, 2023. It is now read-only.

Commit

Permalink
Last changes for production bug caught early
Browse files Browse the repository at this point in the history
  • Loading branch information
confused-Techie committed Dec 16, 2022
1 parent bfb0deb commit dc18a06
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/handlers/package_handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,7 @@ async function getPackagesVersionTarball(req, res) {
//let tarballURL = new url((pack.content.meta.tarball_url ? pack.content.meta.tarball_url : ""));
let tarballURL = pack.content.meta.tarball_url;

if (tarballURL !== undefined) {
if (tarballURL !== undefined && false) { // todo the url feature doesn't work the way we would expect in production
tarballURL = url.parse(pack.content.meta.tarball_url);

if (
Expand All @@ -832,7 +832,7 @@ async function getPackagesVersionTarball(req, res) {
tarballURL = tarballURL.toString();
} else {
// we are likely in a test environment. And will just leave this blank to error out on the client side.
tarballURL = "";
//tarballURL = "";
}

res.redirect(tarballURL);
Expand Down
18 changes: 9 additions & 9 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -494,19 +494,19 @@ class StateStore {
3,
`StateStore.getState() Fail Return Anyway due to bug: ${ip}`
);
return {
ok: true,
content: state,
};
//return {
// ok: true,
// content: state,
//};
// The design here is flawed. Essentially it seems that because we are behind a load balancer
// the process here needs to retain the stateStore, but there's no guarantee that
// one request will hit the same state store, so we will temporarily disable this,
// and instead use the state store as a microservice
//return {
// ok: false,
// short: "Not Found",
// content: "Couldn't find IP within StateStore",
//};
return {
ok: false,
short: "Not Found",
content: "Couldn't find IP within StateStore",
};
}
}
/**
Expand Down

0 comments on commit dc18a06

Please sign in to comment.