Grunt deploy to endpoint (https://rally1.rallydev.com/slm/wt/edit/create.sp) fails with 404 when using Rally apps built using the RallyTechServices app builder
search cancel

Grunt deploy to endpoint (https://rally1.rallydev.com/slm/wt/edit/create.sp) fails with 404 when using Rally apps built using the RallyTechServices app builder

book

Article ID: 279118

calendar_today

Updated On:

Products

Rally SaaS

Issue/Introduction

Several Rally apps that are widely used were built by the Rally Technical Services team using a different version of the Rally App Builder that allows customers to deploy an app to a private dashboard using a grunt task.   Starting in Februrary 2024, this task has started failing for some customers with a 404 when trying to make a post request to this endpoint from an app that was cloned from the Rally Tech Services Github repository:

https://rally1.rallydev.com/slm/wt/edit/create.sp  

Also, when this happens, an html page string segment is saved to the page_oid in the auth.json file.   

Environment

This happens when you try to use the grunt deploy task when building any Rally apps that were constructed using the Rally Technical Services ts-app-builder.  You will know if your app was built using this by the presence of Gruntfile.js in the root directory of the app.  Prior to February 2024, the build process in the grunt file worked fine, creating a new page in Rally with a new custom HTML app with the code. Since Februrary 2024, a URL response leading to a 404 error occurs when the deploy task is executed using the url https://rally1.rallydev.com/slm/wt/edit/create.sp

Cause

In February 2024, older technology was removed and an update was made to the above endpoint that is used to create and edit custom pages.  The same private endpoint was being used in the deploy task of the Technical Services App builder and the removal of that endpoint causes the deploy task to fail.  

Resolution

The resolution is to replace the makePage function in the Gruntfile.js file your repository with the following:  

        var makePage = function(key) {
            var uri = config.auth.server + "/slm/webservice/v2.x/webtab/create";
            var parameters = {
                key: key
            };

            var payload = {
                webtab: {
                    name: "*" + config.name,
                    portholeId: 'myhome',
                    shared: false
            }};

            grunt.log.writeln('Creating page:', payload.webtab.name);

            var options = {
                uri: uri,
                json: payload,
                qs: parameters,
                jar: j
            };

            request.post(options, function(error,response,body){
                if ( response.statusCode != 200 ) {
                    grunt.log.writeln('oops, something went wrong');
                }
               var page_oid = body && body.CreateResult && body.CreateResult.Object && body.CreateResult.Object.ObjectID; 
               if (page_oid) {
                    grunt.log.writeln('Created', payload.webtab.name, " at oid:", page_oid);
                    makeApp(key,page_oid)
               } else {
                    grunt.log.writeln('Create Page failed: ', JSON.stringify(body));
               }
            });
        };

Additional Information

If you have already run the grunt deploy task and gotten an error, be sure to clear out the page_oid and panel_oid from the auth.json file.   

Please note that the endpoints used in this update (and in the previous version of the app builder) are private unpublished endpoints, not officially supported and can change without warning at any time.