-
Notifications
You must be signed in to change notification settings - Fork 6
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
phetioAPIChangeCheck requires authentication #209
Comments
Tagging @samreid too. |
I forgot this is in perennial, so I can't do this this just for GFL. Still for now I will do this. |
I'm not sure which of the proposed ways forward (make the API files public or add authentication for our process) is more promising. A third alternative which seems less promising is to have the build process check out and build the old version. This seems fragile and like it would slow things down, but it circumvents the access problems. |
@samreid and I want to use basic authentication through headers using request-promise-native (what we are using to request stuff currently). Like this! Index: js/grunt/phetioAPIChangeCheck.js
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/js/grunt/phetioAPIChangeCheck.js b/js/grunt/phetioAPIChangeCheck.js
--- a/js/grunt/phetioAPIChangeCheck.js (revision cc938d2e36e24e647206074b63b50e36c7b46680)
+++ b/js/grunt/phetioAPIChangeCheck.js (date 1614199466249)
@@ -48,7 +48,12 @@
const latestVersionString = `${latestVersion.versionMajor}.${latestVersion.versionMinor}.${latestVersion.versionMaintenance}`;
const latestDeployedURL= `https://phet-io.colorado.edu/sims/${repo}/${latestVersionString}/${phetioAPIFileName}`;
- const latestDeployedVersionAPI = JSON.parse( await request( latestDeployedURL ) );
+ const latestDeployedVersionAPI = JSON.parse( await request( {
+ uri: latestDeployedURL,
+ headers:{
+ Authentication: `Basic fdjskafleaiopfejsaiofds` // base64 encoding like username:password
+ }
+ } ) );
const builtVersionAPI = JSON.parse( grunt.file.read( builtVersionAPIFile ) );
See https://www.npmjs.com/package/request-promise#get-something-from-a-json-rest-api for doc Steps for this issue:
High priority but not blocking sounds good to us. |
I deleted this file today. I think we would rewrite it if we ever need this code again. We have greatly changed our philosophy about API changes between versions since 2021. Closing |
phetioAPIChangeCheck was created in #181
Since phet-io api jsons are now password protected (which they weren't when this feature was added), phetioAPIChangeCheck fails, as @jessegreenberg found while trying to publish GFL 2.2 for phet-io. The error he encountered during the auto MR process was:
I'm not sure how to navigate this generally. For this particular deploy, I will remove this check.
Ways forward:
The text was updated successfully, but these errors were encountered: