Remove logging of current task in Grunt - gruntjs

Is there a way to configure Grunt via its API or CLI tool to make it run quietly and stop polluting my console with information about every single task that runs? I've looked through the documentation and Googled extensively but can't find anything.

Related

How to watch tasks logs via CLI in Airflow?

So I am having a problem: there are no logs displaying in Airflow UI I am currently working with, I don't know the reason, but I've already informed my colleagues about it and they're looking for a solution.
Meanwhile I need to watch logs of certain tasks of my Dag. Is there any way to do it via airflow CLI?
I am using airflow tasks run command but it only seems to run tasks, but doesn't show a thing in command line.
By default Airflow should store your logs at $AIRFLOW_HOME/logs/ maybe you'll find them there, if they are still generated.
In the meantime you can use airflow tasks test <dag_id> <task_id> this tests a specific task and displays the logs in your terminal.

Scheduler not updating package files

I'm developing a DAG on Cloud Composer; my code is separated into a main python file and one package with subfolders, it looks like this:
my_dag1.py
package1/__init__.py
package1/functions.py
package1/package2/__init__.py
package1/package2/more_functions.py
I updated one of the functions on package1/functions.py to take an additional argument (and update the reference in my_dag1.py). The code would run correctly on my local environment and I was not getting any errors when running
gcloud beta composer environments run my-airflow-environment list_dags --location europe-west1
But the Web UI raised a python error
TypeError: my_function() got an unexpected keyword argument
'new_argument'
I have tried to rename the function and the error changed to
NameError: name 'my_function' is not defined
I tried changing the name of the DAG and to upload the files to the dag folder zipped and unzipped, but nothing worked.
The error disappeared only after I renamed the package folder.
I suspect the issue is related to the scheduler picking up my_dag1.py but not package1/functions.py. The error appeared out of nowhere as I have made similar updates on the previous weeks.
Any idea on how to fix this issue without refactoring the whole code structure?
EDIT-1
Here's the link to related discussion on Google Groups
I've run into a similar issue. the "Broken DAG" error won't dismiss in Web UI. I guess this is a cache bug in Web server of AirFlow.
Background.
I created a customized operator with Airflow Plugin features.
After I import the customized operator, the airflow Web UI keep shows the Broken DAG error says that it can't find the customized operator.
Why I think it's a bug in Web server Airflow?
I can manually run the DAG with the command airflow test, so the import should be correct.
Even if I remove the related DAG file from the /dags/ folder of airflow, the error still there.
Here are What I did to resolve this issue.
restart airflow web service. (sometimes you can resolve the issue only by this).
make sure no DAG is running, restart airflow scheduler service.
make sure no DAG is running, restart airflow worker
Hopefully, it can help someone has the same issue.
Try restarting the webserver with:
gcloud beta composer environments restart-web-server ENVIRONMENT_NAME --location=LOCATION

Prevent appspec from running scripts (disable hooks)

I'm new to codedeploy. I managed to make a deployment to an ec2 instance successfully (and using git to manage code so everything works beautifully now).
I want some other people besides myself working in the project to be able to deploy source code to the instance but not be able to run a script (especially because codedeploy seems to be running as root). Think of it as an admin/webmaster scenario.
In other words, appspec.yml has the "hooks" section under it and you can run any scripts as part of the deployment. I want to prevent this, the instance has all the software ready for the deployment so won't be needing this.
2 questions:
1) Does this make sense or am I grossly misunderstanding something/am I overkilling by using codedeploy altogether?
2) If it makes sense, how can I achieve this?
This doesn't seem to be something that CodeDeploy is able to do at this moment. But do you want to disable the auto deploy from Github to CodeDeploy? And if anyone else push a code change, it'll exist on Github. When you are ok with the changes, you can do a manually deployment from Github on CodeDeploy console.

ERROR: config_template is not a legal parameter in an Ansible task or handler

I am trying to install Openstack through Ansible for a single node using All IN ONE.
When I run setup-everything.yml file, I am receiving following error:
ERROR: config_template is not a legal parameter in an Ansible task or handler
Can you please help on the issue?
I know that this answer is a little late but I found this and thought to try and help others out should they run into this.
It's very likely that the system was not bootstrapped. We see this error from time to time when the action plugin is not present on the system. With OpenStack-Ansible you will need to retrieve the roles and plugins from the ansible-role-requirements.txt file. After you've cloned the software the first step in deployment is usually running ./scripts/bootstrap-ansible.sh which would install Ansible into a venv, retrieve your roles, libraries, & plugins, and then create the openstack-ansible CLI wrapper. You can also simply use the ansible-galaxy command with the ansible-role-requirements.txt if you don't want to run that script. After you have the roles and libs you will likely no longer see that error. More documentation on getting started can be found here: https://docs.openstack.org/developer/openstack-ansible/developer-docs/quickstart-aio.html
You can get access to the config_template module source code here: https://github.com/openstack/openstack-ansible-plugins/blob/master/action/_v2_config_template.py should you have issues specifically with the module or jump into the #openstack-ansible channel on freenode where there's generally someone available to help out.
config_template is a custom module developed by the OpenStack team. If you get ERROR: config_template is not a legal parameter in an Ansible task or handler it might mean that Ansible can not find the module could be an indention / syntax error as well. Check if the module config_template is in your ANSIBLE_LIBRARY environment variable. You can also pass the path via command line with --module-path
Also the pull request for this module was closed by the Ansible developers. So it is likely that you can find a similar functionality in a module supported by the Ansible developers.

How can a registered Gruntfile task run the subtask concat if it has not been configured there?

The legacy Gruntfile I'm working with has multiple build tasks that include the subtask 'concat', but it is never configured in the context of the Gruntfile (read: a search for concat turns up nothing relevant). The build task does work though and I can see this in my terminal:
Running "concat:generated" (concat) task
File .tmp/concat/app/vendor.css created.
File .tmp/concat/app/app.css created.
File .tmp/concat/app/vendor.js created.
File .tmp/concat/app/app.js created.
I need to add configurations to the task but at the moment I can't begin to even find it. Is there another way this task can be configured? Is there such thing as a concat default?- I didn't see anything remotely implying that in the docs. Any intuitions are greatly appreciated.
It is hard to find a solution for you without having access to the entire project, but here are a few ideas:
Are there multiple Grunt files? see here I am asking this because I see where the concat task is called in the buildProd and buildDev tasks but I don't ever see the task even get loaded (via grunt.loadNpmTasks('grunt-contrib-concat')). So if you see the concat task running in your console output it must be defined somewhere else.
You state the console output says Running "concat:generated". Trying doing a project wide search for concat and generated, maybe something will pop up.
Lastly, try just adding the concat task there in your gruntfile and see what happens. Load the task, configure it with the configurations you need and see if it works or if you get any errors that could possibly lead you in the right direction.

Resources